0

I have a webview on view controller that load a page consist of list of item. If I click on each item, I want to navigate into spesific view controller and bypass an id from item's link.

Right now I have no clue how to do this. Is this even possible?

Any help would be appreciated. Thank you.

Sonic Master
  • 1,238
  • 2
  • 22
  • 36

1 Answers1

0

Yes, this is entirely possible. You need to use a URL Scheme to communicate from JavaScript to native code.

A URL Scheme allows you to pass data from JavaScript to native code like this:

window.location = 'yoururlscheme://somehost?greeting=hello'

You receive this event using UIWebViewDelegate, where you can fire a segue, or whatever you want.

See this answer for details: https://stackoverflow.com/a/36144481/1305067

Community
  • 1
  • 1
paulvs
  • 11,963
  • 3
  • 41
  • 66