IBM Worklight v5.0.5 > Develop IBM Worklight applications > Development guidelines for mobile environments > Web and native code in iPhone, iPad, and Android

Return control to the web view from an Objective-C page

To switch back to the web view the native page must be implemented as an Objective-C class that inherits from UIViewController. This UIViewController class must be able to initialize through the init method alone. The initWithNibName:bundle: method is never called on this class instance.

In the native page, call the [NativePage showWebView:] method and pass it an NSDictionary object (the object can be empty). This NSDictionary can be structured with any hierarchy. The IBM Worklight runtime framework encodes it in JSON format, and then sends it as the first argument to the JavaScript callback function.

Parent Web and native code in iPhone, iPad, and Android

Related information:

UIViewController Class Reference