ios - UIWebView Login form and Dismiss modal -


i using oauth2 log instagram. this, need webview, loads webpage login fields , login button.

how detect if login button pressed in webview can dismiss modal webview presented in?

is there way catch request after press login in webview? can use isviewloaded?

i use detect whether user logins successfully:

- (bool)webview:(uiwebview *)webview shouldstartloadwithrequest:(nsurlrequest *)request navigationtype:(uiwebviewnavigationtype)navigationtype {  nsstring *urlstr = login_ok_url;  nsstring *urlstr1 = login_ok_url_1;  if([urlstring hasprefix:urlstr] || [urlstring hasprefix:urlstr1]){    // login successfully, dismiss view   } else if ([urlstring hasprefix:url_login_cancel] == 1 || [urlstring isequaltostring:url_logout_cancel]) {    // user presses cancel button, dismiss view  }    // processing login page  return yes 

}

detect login button pressed: how intercept button click inside uiwebview on ios?


Comments

Popular posts from this blog

c++ - How to add Crypto++ library to Qt project -

jQuery Mobile app not scrolling in Firefox -

How to use vim as editor in Matlab GUI -