开发者

UIWebView alert not display page URL?

I am using a UIWebview in my app, and when there is an error, it displays 开发者_StackOverflow中文版an alert message.

The message is fine, but the title of the alert message displays the page URL, which doesn't help.

Anyway to get rid of that and display a custom text instead?

Thanks for your help.


Please look at the implementation of the UIWebViewDelegate protocoll where - (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error is defined. There you should set an UIAlertView with - (id)initWithTitle:(NSString *)title message:(NSString *)message delegate:(id)delegate cancelButtonTitle:(NSString *)cancelButtonTitle otherButtonTitles:(NSString *)otherButtonTitles.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜