+

Search Tips   |   Advanced Search

Receiving data from the web view in an Objective-C page

To receive data from the calling web view, follow these instructions.

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.

Write a UIViewController class that implements the method setDataFromWebView:.

-(void) setDataFromWebView:(NSDictionary *)data{
    NSString  = (NSString *) [data valueForKey:@"key"];
}


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

Related information:

http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#/apple_ref/occ/cl/UIViewController