I don't know what I am missing here. I am trying to concatenate strings using [NSString stringWithFormat]
function. This is what I am doing.
NSString *category = [row objectForKey:@"category"];
NSString *logonUser = [row objectForKey:@"username"];
user.text = [NSString stringWithFormat:@"In %@ by %@", category, logonUser];
The problem here is that it always print only one variable. Say if there is "Sports" in category and "Leo" in logonUser it will print "In Sports" and skip the remaining text. It should print "In Sports by Leo".
Is user
a UILabel? Make sure that your text isn't wrapping or being clipped. Try making the UILabel bigger.
You need to try:
NSLog(@"In %@ by %@", category, logonUser);
To check the problem! Let me know the results on debugger console XD
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