I was working on an app but when i load the second view it displays a blank web page. I have youtube in there as a filler for now just to make sure it was not the website acting up.
#
import "SecondViewController.h"
@
interface SecondViewController()
@ end
@ implementation SecondViewController
- (void) viewDidLoad {
[super viewDidLoad];
webView.delegate = self; //don't know if this does anything
NSString * webPage = @"http://www.youtube.com";
NSURL * url = [NSURL URLWithString: webPage];
NSURLRequest * request = [NSURLRequest requestWithURL: url];
[webView loadRequest: request];
}
- (void) didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@
end
#
import < UIKit / UIKit.h >
@interface SecondViewController: UIViewController {
IBOutlet UIWebView * webView;
}@
end
Aucun commentaire:
Enregistrer un commentaire