开发者

Callback for when a UIWebView is closed in iOS SDK

开发者 https://www.devze.com 2023-01-31 17:50 出处:网络
In my app, I load a开发者_如何学JAVA WebView and then from that load another in an embedded browser. I would like to execute a function on the first WebView when the user closes the embedded browser.

In my app, I load a开发者_如何学JAVA WebView and then from that load another in an embedded browser. I would like to execute a function on the first WebView when the user closes the embedded browser. Anyone know how I can achieve this? What I need ideally (and believe does not exist) is a callback function when a user closes an embedded browser.

Thanks, Neha.


Basic concept is listed below

// set up notification for when embedded browser is closed
[[NSNotificationCenter defaultCenter] addObserver:self 
          selector:@selector(myMethod) 
          name:@"embeddedBrowserClosed" object:nil];

// post notification when browser is closed
[[NSNotificationCenter defaultCenter] 
          postNotificationName:@"embeddedBrowserClosed"]

See more here at this Blog Posting

0

精彩评论

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

关注公众号