Q:

How to pass a NSString object to stringByAppendingFormat:

How to pass a NSString object to stringByAppendingFormat in objective c.
I am able to append string as:
NSString *aString =[name stringByAppendingFormat:@"Hello"];

but its not being possible to use an object of NSString for appending for example in my case
NSString *aString =self.stringName;
NSString *resultString =[name stringByAppendingFormat:[NSString stringWithFormat:@"%@",aString]];

what has to be changed in the above code ?

A:

When using stringByAppendingFormat you are going to need a format.
If you just want to append you should use:
NSString *aString =self.stringName;
NSString *resultString =[name stringByAppendingString:aString];

or
NSString *aString =self.stringName;
NSString *resultString =[name stringByAppendingFormat:@"%@",aString];

A:

Maybe you must try in this way ?
NSString *aString  = self.stringName;
NSString * tempStr = [NSString stringWithFormat:@"%@",aString];
NSString *resultString =[name stringByAppendingFormat:tempStr];

