iphone - How do I open links in a WebView rather than Safari? -


I have a text view that contains links to web pages, like Wikipedia usually when I click on the link So it closes my app and unlocks the safari.

How can I control the hyperlink, so it loads web pages in UIBelwee instead of Safari?

What do I do not want to add a button to the link, because it is a scrollable text view.

Is there a zero that I can call, because clicking on the link is also showing the web view is clicked.

Thanks

(I'm learning a 12-year education for the program for the iPhone. View the Speaker or go to timh.me.uk for my first app)

  & lt; Key & gt; CFBundleURL types & lt; / Key & gt; & Lt; Array & gt; & Lt; Dict & gt; & Lt; Key & gt; CFBundleURLName & lt; / Key & gt; & Lt; String & gt; Com.test.nttp & lt; / String & gt; & Lt; Key & gt; CFBundleURLSchemes & lt; / Key & gt; & Lt; Array & gt; & Lt; String & gt; Ntp & lt; / String & gt; & Lt; / Array & gt; & Lt; / Dict & gt; & Lt; / Array & gt;  

When you write content for your text view, instead of "http" ("nttp: //www.stackoverflow.com/" instead of "" the "nttp" URL scheme Use the ).

Apply the application: handleOpenURL: method to your app rep:

  - (BOOL) Application: (UIApplication *) Application Handle Open URL : (Ns URL *) url {NSString * aUrl = [url absoluteString]; // Use url return Yes; }  

For example, you can change "nttp" by "http" and start some web visuals with it ...

Hope That this solution is sufficient ...


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -