我有 uiwebview,当我将方向从纵向更改为横向时,我想防止重新加载当前 url,反之亦然。
你有什么主意吗?
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view.
website.delegate = self;
[self home];
}
- (void)home {
// Create a URL object
NSURL *isuURL = [NSURL URLWithString: @"http://www.example.com"];
// URL Request Object
NSURLRequest *requestObject = [NSURLRequest requestWithURL:isuURL];
// Load the request in the UIWebView
[website loadRequest:requestObject];
}