Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jun 16, 2013, 09:06 AM   #1
DavidBlack
macrumors 6502
 
Join Date: Jan 2013
Location: Somewhere In Apple's HQ ;)
how to get notified when webview finished loading

Ok I want to know when my webview which is name youtubewebviewview to know when it's finish loading. I am using this code from apple but it seem like it's not getting called I used break points to make sure.

Code:
- (void)webView:(WebView *)sender didStartProvisionalLoadForFrame:(WebFrame *)frame
{
    // Only report feedback for the main frame.
    if (frame == [sender mainFrame]){
        NSString *url = [[[[frame provisionalDataSource] request] URL] absoluteString];
        [textField setStringValue:url];
    }
}
DavidBlack is offline   0 Reply With Quote
Old Jun 16, 2013, 10:16 AM   #2
Red Menace
macrumors regular
 
Join Date: May 2011
Location: Littleton, Colorado, USA
Take a look at webView:didFinishLoadForFrame
__________________
MacBook Pro / OS X Mavericks (10.9.3) / Xcode 5.1.1 / RubyMotion FTW
Red Menace is offline   0 Reply With Quote
Old Jun 26, 2013, 06:25 AM   #3
Meir David
macrumors newbie
 
Join Date: Jun 2013
hi dude

Here is a code for you

Just implement WebViewClient and extend onPageFinished() as follows:



mWebView.setWebViewClient(new WebViewClient() {

public void onPageFinished(WebView view, String url) {
// do your stuff here
}
});
Meir David is offline   0 Reply With Quote
Old Jun 26, 2013, 02:09 PM   #4
chown33
macrumors 603
 
Join Date: Aug 2009
Quote:
Originally Posted by Meir David View Post
hi dude

Here is a code for you

Just implement WebViewClient and extend onPageFinished() as follows:

mWebView.setWebViewClient(new WebViewClient() {

public void onPageFinished(WebView view, String url) {
// do your stuff here
}
});
This is completely wrong.

The question was asked in Objective-C. This "answer" is in Java, most likely for Android, since WebViewClient seems to be android.webkit.WebViewClient.
chown33 is offline   1 Reply With Quote
Old Jun 28, 2013, 03:07 PM   #5
DavidBlack
Thread Starter
macrumors 6502
 
Join Date: Jan 2013
Location: Somewhere In Apple's HQ ;)
Quote:
Originally Posted by chown33 View Post
This is completely wrong.

The question was asked in Objective-C. This "answer" is in Java, most likely for Android, since WebViewClient seems to be android.webkit.WebViewClient.
I have figured this out a long time ago but thanks for the help . That Objective C book is helping me understand the concept much better .
DavidBlack is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Anyone get notified about tickets yet? bmunge Apple, Industry and Internet Discussion 0 Apr 7, 2014 12:42 PM
App Store loading...loading...loading evilrt iPhone Tips, Help and Troubleshooting 0 Sep 22, 2013 08:05 AM
How do I get notified for non-inbox email? yalag OS X 10.8 Mountain Lion 4 Aug 23, 2012 06:01 PM
How to get notified on my ipad if someone im following tweets? ace08 iPad 4 Jun 3, 2012 05:44 PM

Forum Jump

All times are GMT -5. The time now is 03:40 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC