iOS: Print "%" in Label
'%' is a function word in Objective C, such as '%d" to print a number, How to print a '%' in a string? that is easy, just '%%'
Code
self.txtPercent.text= [NSString stringWithFormat:@"%d%%", (int)sender.value]; |
Tags: ios
Trackback address for this post
Trackback URL (right click and copy shortcut/link location)
Feedback awaiting moderation
This post has 3974 feedbacks awaiting moderation...
Form is loading...