sprintf with NSString

So, I have been struggling to learn Objective C. Here is a snippet of code that might be helpful. Basically you can use NSString’s initWithFormat method to create a new NSString object and use it just like sprinf function in C

[[NSString alloc] initWithFormat:@”(%f,%f)“,center.x,center.y]   

By: gavi on: