¡@

Home 

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

iphone Programming Glossary: sizeofcontentwidth

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

one UITextView in a 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.. 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 size line height font size . Sorry.. some small bugs and it gives wrong position if you type Chinese 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..