I'm trying to capitalize all letters in a NSString
for a table cell label.
Here's my code:
// cell title and subtitle
cell.nameLabel.text = listingNode.title;
[cell.nameLabel.text uppercaseString];
It doesn't seem to have any effect at all.
I'm trying to capitalize all letters in a NSString
for a table cell label.
Here's my code:
// cell title and subtitle
cell.nameLabel.text = listingNode.title;
[cell.nameLabel.text uppercaseString];
It doesn't seem to have any effect at all.
The method uppercaseString
returns an uppercased representation of the receiver. Which means you need to collect the returned string and apply that to the label as text.
Try this,
NSString *uppercase = [cell.nameLabel.text uppercaseString];
cell.nameLabel.text = uppercase;
You need to just convert your string to uppercase
cell.nameLabel.text=[String_name uppercaseString];
What do you think about that.
cell.nameLabel.text = [listingNode.title uppercaseString];
uppercaseString returns a value - NSString that contains the result of the operation.
cell.nameLabel.text = [listingNode.title uppercaseString];