OpenUrl freezes app for over 10 seconds

前端 未结 11 963
孤街浪徒
孤街浪徒 2020-12-13 02:05

I\'m currently developing an App, that needs to open a browser to display a webpage. To do that i use the [UIApplication sharedApplication] openURL method with

11条回答
  •  自闭症患者
    2020-12-13 02:22

    I have seen the same issue in iOS 7. My solution is only slightly different from those already proposed. By using performSelector with just a 0.1 second delay, the app immediately opens the URL.

    [self performSelector:@selector(methodToRedirectToURL:) withObject:url afterDelay:0.1];
    

提交回复
热议问题