On ios8 and iPad if a uiwebview is displaying a HTML page containing a drop down list
eg this page http://www.w3schools.com/tags/tryit.asp?filename=tryh
I have decreased the probability of occurrence of crash in this way.. Used javascript code and native ios
Web Side code changes
window.location='fromJavaScript://PopoverIssue'; "shouldStartLoadWithRequestNative Side code changes
UIPopoverPresentationControllerDelegate protocol on viewcontroller which has uiwebview and over ride popoverPresentationControllerShouldDismissPopover popoverPresentationControllerDidDismissPopover[[UIApplication sharedApplication] beginIgnoringInteractionEvents];
self.popoverPresentationController = self.presentedViewController.popoverPresentationController;
self.existedPopoverDelegate = [self.popoverPresentationController delegate];
self.popoverPresentationController.delegate = self;
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0);
dispatch_async(queue, ^{
int64_t delay = 2.0;
dispatch_time_t time = dispatch_time(DISPATCH_TIME_NOW, delay * NSEC_PER_SEC);
dispatch_after(time, dispatch_get_main_queue(), ^{
if([[UIApplication sharedApplication] isIgnoringInteractionEvents])
{
[[UIApplication sharedApplication] endIgnoringInteractionEvents];
}
});
});implement the overridden protocol methods as follows
(BOOL)popoverPresentationControllerShouldDismissPopover:(UIPopoverPresentationController *)popoverPresentationController
{
[self.existedPopoverDelegate popoverPresentationControllerShouldDismissPopover:popoverPresentationController];
return YES;
}
(void)popoverPresentationControllerDidDismissPopover:(UIPopoverPresentationController *)popoverPresentationController
{
[self.existedPopoverDelegate popoverPresentationControllerDidDismissPopover:popoverPresentationController];
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0);
dispatch_async(queue, ^{
int64_t delay = 2.0;
dispatch_time_t time = dispatch_time(DISPATCH_TIME_NOW, delay * NSEC_PER_SEC);
dispatch_after(time, dispatch_get_main_queue(), ^{
if([[UIApplication sharedApplication] isIgnoringInteractionEvents])
{
[[UIApplication sharedApplication] endIgnoringInteractionEvents];
}
});
});
}
Hope it will help to decrease the crash occurrence .