Reputation: 113
I'm working on an application for iOS in which I would like to place the fractional value 1/2 as a single character within an NSString for use in an UILabel, is this possible?
Upvotes: 0
Views: 1291
Reputation: 25144
You can simply use Mac OS's built-in character viewer: http://docs.info.apple.com/article.html?path=Mac/10.6/en/8164.html
So you can just do label.text = @"½"
Upvotes: 2
Reputation: 765
Try setting the label's text property to the Unicode of 1/2:
label.text = [NSString stringWithFormat:@"%C",0x00bd];
Upvotes: 2