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;
NSString * str=@"jit";
NSLog(@"%@",[str uppercaseString]);
cell.nameLabel.text=[str uppercaseString];
You need to just convert your string to uppercase
cell.nameLabel.text=[String_name uppercaseString];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With