I have a certain confusion on how to return values in Objective C with NSString return type but having variables inside it.
Is this okey?
- (NSString *)returnInfo{
return @"Userinfo:\nusername: %@\npassword: %@", self.username, self.password;
}
Your answers are highly appreciated…
Thanks…
It should probably be
Your code would probably compile too, but it would return
password, because of the way the comma operator works. This is almost certainly not what you had in mind, though.