Cannot create outlet connections to subviews in Interface Builder (Xcode 5)

后端 未结 5 1408
悲哀的现实
悲哀的现实 2020-12-02 16:32

I know this appears to be a duplicate of some other questions, but the answers are not working for me.

  1. I have created a single view app.
  2. In the stor
5条回答
  •  悲&欢浪女
    2020-12-02 17:34

    You can manually write the IBOutlet property declaration in the @interface of the custom view subclass, and assuming you've defined the base class of your subview in IB, then you can drag from the outlet circle in the code back to the control in the scene.

    enter image description here

    Or, as you point out, Warren Burton suggested both this technique and another in his answer to this other question, Can't Wire to Subview in IB.

提交回复
热议问题