ViewController
- UIWebView:
webView
- 単純な UIWebView - UIButton:
aboutButton
- AboutViewController に移動します
ViewControllerについて
- UIButton:
websiteButton
- 接続済みclickWebsiteButton
- IBAction:
clickWebsiteButton
- AboutViewController を閉じ、ロードhttp://websiteURL.com/
しますwebView
(ViewController 内にあります)。
ViewController コードについて
// AboutViewController.h
#import "ViewController.h"
@class ViewController;
@interface AboutViewController : UITableViewController <UIWebViewDelegate> {
ViewController *viewController;
}
// AboutViewController.m
-(IBAction)clickWebsiteButton:(id)sender {
[viewController.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://websiteURL.com/"]]];
[self dismissModalViewControllerAnimated:YES];
}
質問
http://websiteURL.com/
IBAction を介してビューを閉じると、UIWebView 内にロードできるようにしたいと考えています。現時点では、ビューを閉じるだけで、WebView 内に URL をロードすることはありません。WebView は機能しており、URL を適切にロードしています。別のビューからこの URL をロードする際に問題が発生しています。何か案は?
ありがとう