Can't connect IBOutlet in Interface Builder

前端 未结 19 2045
别跟我提以往
别跟我提以往 2020-12-04 20:02

I\'m having a weird experience. I create any type of iPhone application, add a UIViewController with Xib file. I can edit the xib file with controls and see them rendered if

19条回答
  •  自闭症患者
    2020-12-04 20:38

    For me the issue was that I had created a MyUITextView extending the UITextView and X-Code would'nt connect. My workaround was to use UITextView in IBOutlet temporarily to connect/link and then change to my custom view.

    So I changed.

    IBOutlet MyUITextView *tv;
    

    to

    IBOutlet UITextView *tv;
    

    and then connected/ linked. Once connected, I changed my OBOutlet back to MyUITextView

    IBOutlet MyUITextView *tv;
    

提交回复
热议问题