0

Is there a way to detect the total amount of characters displayed in an UIlabel. The uilabels text is from an NSString. The uilabel is an outlet. Any help and example would be appreciated!

2 Answers 2

5

yourOutletName.text.length will give the total number of characters.

0
0

You can use this also

NSString *myString=@"Sample";
NSUInteger characterCount = [myString length];
1
  • 1
    This works for a string, but not a label, which is what the question asks.
    – lnafziger
    Feb 25, 2013 at 17:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.