Search code examples
objective-cnsstringnsobject

NSObject to NSString Objective-C


Can someone help me to convert an NSObject to NSString?

I'm trying to do something like this -

NSString *address = [NSString stringWithFormat:ivpObj.addressStr];

But I got an warning - Format is not a string literal and no format arguments

Please some one help


Solution

  • How about this:

    NSString *address = [NSString stringWithFormat:@"%@", ivpObj.addressStr];