Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

On my first view controller I had no problem creating IBOutlets and Actions, but when I made another view controller, I couldn't make an IBOutlet. There was no blue line when I control dragged it and I couldn't make an IBOutlet and then connect it up either. The first view controller still works. Is it possible to make IBOutlets on two different view controller?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
169 views
Welcome To Ask or Share your Answers For Others

1 Answer

Your view controller must have a custom class file assigned to it in the identity inspector in InterfaceBuilder:

enter image description here

Then select the assistant editor and you should be able to ctrl-drag IBOutlets to the associated swift file.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...