NSObject to NSString Objective-C

Mohammad Ashraful Kabir picture Mohammad Ashraful Kabir · Jun 1, 2011 · Viewed 14.4k times · Source

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

Answer

Eimantas picture Eimantas · Jun 1, 2011

How about this:

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