Monday, December 16, 2013

How to get width of the rectangle uitextfield text input?

How to get width of the rectangle uitextfield text input?

Only to find out the number of alphanumeric characters inside and special characters? Then calculate the length?
Reply:
If CoreText, you can easily get the text width of the rectangle.
Reply:
nsstring * a = uitextfield.text

[A lenth]??

I am a novice. . . This is thought
Reply:
* Calculate the length of each character after the pixel unit = total length?
Reply:
sizeWithFont: constrainedToSize: lineBreakMode:
NSString way to get size

Reply:
Upstairs is a positive solution, affixed to a more detailed

[String1 sizeWithFont: font constrainedToSize: constraintSize lineBreakMode: UILineBreakModeWordWrap];
Reply:
references, 5th Floor hjue reply:
Upstairs is a positive solution, affixed to a more detailed

[String1 sizeWithFont: font constrainedToSize: constraintSize lineBreakMode: UILineBreakModeWordWrap];

I found this count are not allowed.
Enter the Chinese with the letters in the same position the cursor reaches of different lengths
Reply:
The reply was deleted at the moderator 2011-12-19 11:17:58

No comments:

Post a Comment