0

When I try and control, click and drag the WebKit View from my main.Storyboard it just has the blue line but no connection options. I tried it on my UIViewController.h and it gave me connection options. Is this a bug? If so how can I fix it? This is the blue line I am talking about.

2 Answers2

1

Check if you imported webkit module

import UIKit
import WebKit

Then Connect out let
works for me!

Ctrl+Click and drag to view controller

Release click where ever in side view controller when you see "Insert outlet message with collection line"

Or try reverse like screen short. First manually write @IBOutlet weak var webView: WKWebView!

then click drag from code to Webview Write IBOutlet manually

Britto Thomas
  • 2,092
  • 1
  • 15
  • 28
0

Why does your view controller containing the WebKit have so many IBOutlets and IBActions?

Is your Storyboard UIViewController correctly connected to it's corresponding UIViewController class? It's most likely this, if it isn't it might simply be a bug, try cleaning the project, closing it and reopening.

Select your view controller in storyboard and then enter image description here

Sung
  • 434
  • 5
  • 17
  • I had so many IBOutlets and IBActions because this is a work in progress app. I had tried to make something harder than what it really was. I cleaned it up however it did not fix my problem. – Nick Miller Mar 08 '18 at 17:34
  • Did you do what we have all told you to do and give the storyboard its class? – Sung Mar 08 '18 at 17:40
  • I didn't understand how to do that, but now I do understand what that is. Thank you for your help. – Nick Miller Mar 08 '18 at 18:08