¡@

Home 

2014/10/15 ¤U¤È 10:14:14

iphone Programming Glossary: sizeofcontentline

How to find a pixel-positon of a cursor in UITextView?

http://stackoverflow.com/questions/3920944/how-to-find-a-pixel-positon-of-a-cursor-in-uitextview

landscape mode so its width is 1024 and I used the custom font with size 21. You should change sizeOfContentWidth and sizeOfContentLine appropriately. sizeOfContentWidth is smaller than the actual width and sizeOfContentLine is larger than the actual font.. change sizeOfContentWidth and sizeOfContentLine appropriately. sizeOfContentWidth is smaller than the actual width and sizeOfContentLine is larger than the actual font size line height font size . Sorry about messy code and comments There are still some small.. characters at the end of line no word wrap . #define sizeOfContentWidth 1010 #define sizeOfContentHeight 1000 #define sizeOfContentLine 25 Stores the original position of the cursor NSRange originalPosition textView.selectedRange Computes textView's origin..