Daniel Ran Lehmann
Daniel Ran Lehmann

Reputation: 377

detect total amount of characters displayed in UILabel

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!

Upvotes: 0

Views: 1406

Answers (2)

DAMM108
DAMM108

Reputation: 960

You can use this also

NSString *myString=@"Sample";
NSUInteger characterCount = [myString length];

Upvotes: 0

Anoop Vaidya
Anoop Vaidya

Reputation: 46533

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

Upvotes: 5

Related Questions