Larry Dugan
Larry Dugan

Reputation: 23

Can't create a IBOutlet for WebKit view in Swift 4

I am trying to put a website in the middle of my storyboard. When I add the view controller and try to connect it to a new ViewController, I cannot control-drag the object to create the Outlet. I can create outlets for Labels and buttons, and all the rest of the normal objects. Just not for the webkit view control. It works if I try it in a new project just like it is supposed to. Is this a bug or is something in my program blocking web content? There is no code to share since I can't get that far.

Upvotes: 0

Views: 351

Answers (1)

ashish
ashish

Reputation: 11

I understood your problem. Such kind of thing sometimes happen with me. I uses a one tick to solve this problem. I copy the outlet of other control and then i rename it and change the property to my requirement. For Example, @IBOutlet weak var myButton: UIButton!

After then you can connect outlets to your control.

It works fine.

Upvotes: 1

Related Questions