I made a subclass of UIViewController.
It has a UIWebView property called *_webview.
When I set that UIViewController’s view property to be _webview, I stop getting notifications from my view. So I can’t implement any method with the delegate, not even viewDidLoad! I am not sure why it is happening or what am I doing wrong
I made a subclass of UIViewController. It has a UIWebView property called *_webview .
Share
Don’t set the view controller’s view to be the web view. In the
viewDidLoadmethod, create theUIWebViewand add it as a subview of the view controller’s view. Something like this:This will make the web view fill the view controller. This code assumes ARC. No web view property is needed unless you need to reference the web view from any methods other than the delegate methods.