Im new to Cocoa.
I'm trying to extract the URL of the currently loaded webpage in my WebView object. I use this WebView to show a login screen and after logging in I have to get some parts of the URL.
I have already tried
[[[[frame provisionalDataSource] request] URL] absoluteString];
but this one on开发者_运维知识库ly works one time, when called while loading. If the loading is complete it returns "(null)". The problem is, that it seems like the URL changes while loading the page so i get the wrong URL.
Does anybody know how to get the URL at any time I want?
Thanks
Switch provisionalDataSource
with dataSource
. Once the frame starts loading, it's not provisional anymore.
精彩评论