NOTE: Problem Solved. Thanks
I’m simply a high school student on a brand new app developer program. So, please excuse me seeming like I know very little, as, I really don’t know as much as I will yet. Bear with me XD
I need to use the following startup from AppDelegate to display a start screen for the webView in my application, rather than a blank white screen:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// THIS SECTION IS WHAT I NEED
NSURL *url = [NSURL URLWithString:@"http://www.earlham.k12.ia.us"];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[webView loadRequest:request];
return YES;
}
To use that, however, I need access to webView, which is my WebView object that I declared in ViewController.h. However, that doesn’t work, because I can’t declare it twice, nor use it from the other header file, to my knowledge. I know it’s possible, but at this basic level, I don’t know how. Please include code examples.
Many thanks!
Why would you put this in the application delegate? This looks like something the actual ViewController should be able to handle.