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
精彩评论