UIWebView - adding an object to the address
I have a UIWebView that I'd like to load a web page and also append an object to the end of the address.
this is what I have:
NSString *urlAddress = @"http://www.wikipedia.org/%@",recipeName;
the name of开发者_StackOverflow中文版 a particular recipe would be appended to the end of the URL
I'm getting the "statically allocated instance of Objective-C class NSString" error. Is my syntax incorrect or is it something else?
I've been looking at this for quite a while now and thought I'd ask the community here.
thanks in advance.
NSString *urlAddress = [NSString stringWithFormat:@"http://www.wikipedia.org/%@",recipeName];
Try this code it will work..
hAPPY cODING...
Try this:
NSString *urlAddress = [NSString stringWithFormat: @"http://www.wikipedia.org/%@",recipeName];
You cannot create string with format directly, try [NSString stringWithFormat].
Well not fast enough I guess ...
精彩评论