I have the following in a view controller (where webView
is an instance variable of type UIWebView
):
- (void)loadView
{
webView = [[UIWebView alloc]initWithFrame:self.view.frame];
[self.view addSubview:webView];
}
The first line, allocating the web view, causes a crash -- I get EXC_BAD_ACCESS and a message in the console:
Warning: Unable to restore previously selected frame
I don't understand whats causing the crash; self.view.frame
is definitely a CGRect
.