I am trying to load a website into a webview which I've been able to do before. But I can't seem to get it to load correctly. I have looked all over Stack and other forums for a solution but I can't seem to figure it out.
My .h file is as follows:
#import "ViewController.h"
@interface ScheduleView : ViewController
@property (strong, nonatomic) IBOutlet UIWebView *webview;
@end
and my .m:
#import "ScheduleView.h"
@interface ScheduleView ()
@end
@implementation ScheduleView
- (void)viewDidLoad {
[super viewDidLoad];
NSString *urlstring = @"http://www.google.com";
NSURL *url = [NSURL URLWithString:urlstring];
NSURLRequest *urlRequest = [NSURLRequest requestWithURL:url];
[_webview loadRequest:urlRequest];
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
@end
Whenever I try to run my application, it will launch as intended but when I navigate to the ViewController containing the WebView, it will just show a blank screen. And I have tried to use other websites other than google.
This is my first time posting so if I need to give more information, please let me know and I will do my best to reply swiftly.
EDIT:
After putting in the break point on
[super viewDidLoad];
it did come back "nil"
What does this mean? How do I fix it?