Has all the methods of PM::Screen
Easily create a web-based view from an external URL, internal HTML file, or HTML string.
open MyWebScreen.new(nav_bar: true, external_links: false)
class MyWebScreen < PM::WebScreen title "Title of Screen" def content # You can return: # 1. A reference to a file placed in your resources directory # 2. An instance of NSURL # 3. An arbitrary HTML string "AboutView.html" end def load_started # Optional # Called when the request starts to load end def load_finished # Optional # Called when the request is finished end def load_failed(error) # Optional # "error" is an instance of NSError end end
Behavior: true causes all links clicked in the
WebScreen to open in Safari (or Chrome).
detector_types: [:none, :phone, :link, :address, :event, :all]
Behavior: An array of any of the above values to specify what sort of detectors you'd like the webview to auto-link for you. You can read more about
Opening External Links in Chrome
If you want your users to have links open in the Google Chrome iOS app, simply add this to your
app.pods do pod 'OpenInChrome' end
This will change the default behavior of your app to check and see if Chrome is installed and if so, open the link in Chrome. Otherwise, the links will open in Safari.
WebScreen to load new content (where
content is a string reference to a local file in the
resources directory or an
NSURL or an arbitrary bit of HTML).
Returns the current HTML contained in the
WebScreen as a string.
boolean if the user can navigate backwards (e.g., if there's anything in the history).
boolean if the user can navigate forwards.
Navigates back one page.
Navigates forward one page.
Refreshes the current URL. Alias:
Cancels the current URL request and stops loading the page.
Reference to the UIWebView that is automatically created.