Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this questionI'm trying to get a UIWebView working with the following code:
NSString *urlAddress = [NSString stringWithFormat: @"http://www.wikipedia.org/wiki/%@",recipe.name];
recipe.name
is the entity and property from the core data model
I used NSLog to test the recipe.name
and it is outputting correctly to the console
I tried this with just a plain URL and it works fine:
NSString开发者_如何学JAVA *urlAddress = [NSString stringWithFormat: @"http://www.wikipedia.org/wiki/soup"];
Initialize your
UIWebView
.Create an
NSURL-object
containing your url(using +[NSURL URLWithString:]
for example).Create an
NSURLRequest-object
with the createdNSURL-object
.load the
NSURLRequest
in your webView.Voila
:)
精彩评论