Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connecting UITextField in Interface Builder to IBOutlet defined in code

Any idea why IB doesn't let me make this connection?

alt text

like image 615
Bemmu Avatar asked Oct 14 '22 20:10

Bemmu


2 Answers

In the Identity Inspector for that views File's Owner, make sure that the Class is set to MainScreenViewController. If you could add a screenshot of your MainScreenViewController.xib window that may be more helpful.

like image 128
David Hancock Avatar answered Nov 15 '22 09:11

David Hancock


You are trying to link two different IB documents, i.e two different .xib files, which is not possible. I think you really only want to have one .xib file here.

like image 23
vakio Avatar answered Nov 15 '22 08:11

vakio