Hello,
I've set up a UIWebView named webView. I can load the webView in a second view but when I return to my main view and then back to my second view, the app crashes EXC BAD ACCESS. After looking online I found that the problem seems to occur only when I use a youtube URL. Does anyone have a solution?
my .h
my .m
Thanks,
Nick
I've set up a UIWebView named webView. I can load the webView in a second view but when I return to my main view and then back to my second view, the app crashes EXC BAD ACCESS. After looking online I found that the problem seems to occur only when I use a youtube URL. Does anyone have a solution?
my .h
Code:
@interface SecondView : UIViewController <UIWebViewDelegate> {
IBOutlet UIWebView *webView;
}
- (IBAction)backview;
@property (nonatomic, retain) IBOutlet UIWebView *webView;
@end
my .m
Code:
@synthesize webView;
- (void)viewDidLoad {
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.youtube.com/user/nickculbertson"]]];
[super viewDidLoad];
}
- (void)dealloc {
webView.delegate = nil;
[webView stopLoading];
[webView release];
[super dealloc];
}
Thanks,
Nick