int to NSString
The following example displays an integer's value as a text label:
currentScoreLabel.text = [NSString stringWithFormat:@"%d", currentScore];
NSString to int
The following example displays a text value as a integer:
int currentScore=[currentScoreLabel.text intValue];
intValue doesn´t works in IOS
ReplyDelete