UIWebView random crash at [UIViewAnimationState release]: message sent to deallocated instance

前端 未结 8 1059
Happy的楠姐
Happy的楠姐 2020-12-04 16:24

I\'m having a random UIWebView crash using iOS8.1 and UIWebView, using an iPhone5. In my tests the crash doesn\'t

8条回答
  •  独厮守ぢ
    2020-12-04 16:50

    [super viewDidLoad];
    
    [[MPVolumeView alloc] init]; <------ add this line, that will be ok too.
    
    NSURLRequest * urlRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.amazon.com"]];
    
    self.webView.layer.cornerRadius = 0;
    self.webView.userInteractionEnabled = YES;
    self.webView.multipleTouchEnabled = YES;
    self.webView.backgroundColor = [UIColor clearColor];
    self.webView.scrollView.scrollEnabled = NO;
    self.webView.scrollView.bounces = NO;
    [self.webView loadRequest:urlRequest];
    

提交回复
热议问题