IOS webview not show system alert like "the request time out" -
my app web view app, shows system alert "the request time out". not want show alert.
can dismiss alert? or how can click ok button in source. or can ok object? can click event in source.
are using wkwebview
or uiwebview
?if wkwebview
,you can alertmessage
dealing using webview:runjavascriptalertpanelwithmessage:
in uidelegate
,this method can used if using uiwebview
, need add new category,
for example:in viewcontroller.h
@interface uiwebview(viewcontroller) - (void)webview:(uiwebview *)sender runjavascriptalertpanelwithmessage:(nsstring *)message initiatedbyframe:( id *)frame; @end
and in viewcontroller.m
@implementation uiwebview(viewcontroller) -(void)webview:(uiwebview *)sender runjavascriptalertpanelwithmessage:(nsstring *)message initiatedbyframe:(__autoreleasing id *)frame { //do message } @end
and think can choose shall alerted.
Comments
Post a Comment