I have made a plugin for the iphone which is working fine. I can call all the native methods. I also made a custom view (.xib file) which i want to load. But i can’t figure out how to do this with phonegap in the way.
Normally i would do something like:
[self addSubView:myView2];
But this doesn’t work.
Anyone any idea how to load and display a custom made .xib file when using phonegap??
Have you used Child browser plugin so far, this plugin also contain ChildBrowserViewController.xib . So to call another xib in your Phonegap you need to modify your
- (BOOL)webView:(UIWebView *)theWebView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationTypemethod in appDelgate.m file.
Some how in your HTML and javascript code, you need to provide special link (using href or window.location method) that you need to handle in
shouldStartLoadWithRequestmethod, import your#import MyCustomViewController.hin your appDelegate.m file.Please have look at the following snippet-
thanks,
mayur