Add the following header:
#import <Cordova/CDVViewController.h>
Instantiate a new CDVViewController and retain it somewhere,
e.g., to a class property:
CDVViewController* viewController = [CDVViewController new];
Optionally, set the wwwFolderName property, which defaults to www:
viewController.wwwFolderName = @"myfolder";
Optionally, set the start page in the config.xml file's
<content> tag, either a local file:
<content src="index.html" />
...or a remote site:
<content src="http://apache.org" />Here I recommend using viewController.startPage = @"myPage.html" instead, as you can have different cleaver views.
Optionally, set the useSplashScreen property, which defaults to
NO:
viewController.useSplashScreen = YES;
Set the view frame. Always set this as the last property:
viewController.view.frame = CGRectMake(0, 0, 320, 480);
Add Cleaver to the view:
[myView addSubview:viewController.view];
Thank you, jcesarmobile. I understand from your explanation, the guide is for adding Cleaver to an iOS project created without PhoneGap. Thank you for clearing that up.
I
also understand that leaves the steps you transcribed as where I need to
pickup the process to add a Cleaver view. Unfortunately, this still
leaves me with a problem, because I don't know how to do some of the
steps, because I am not very familiar with iOS development.
Here are questions about the first 2 steps for adding Cleaver to a view:
Step 1: The header for #import <Cordova/CDVViewController.h>
already is in the MainViewController.h file, contained in the classes folder for the project, so I think that means that
step is complete already. Here is a screenshot of what I am talking about. Can you confirm this completes the step for importing the header?
That's it.
I wonder, is there a way to have an update posted to the PhoneGap documentation, so people in this circumstance can get to the solution more easily?
Thank you for your help. Much appreciated.