How would I expose an Objective-C method within JavaScript when using the iPhone SDK when using the UIWebView?
Any help would be appreciated!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The best way to do this would be through a custom link, and then use the UIWebView delegate method
-webView:shouldStartLoadWithRequest:navigationType:to trap requests. When you see a request come through with your link in it, you know your action has been triggered.