Interface Builder won't allow connections to custom UIView class?

前端 未结 5 1707
野的像风
野的像风 2021-01-02 09:44

Using Xcode 4.3.3, I can\'t figure out how to connect outlets in a custom UIView class with objects created in Interface Builder.

In one ViewController, I have a var

5条回答
  •  清酒与你
    2021-01-02 10:14

    I had the same problem and found a workaround:

    1) Open the Assistant Editor with customView3.xib on the left and customView3.h on the right

    2) ctrl + drag from UISlider in customView3.xib to the customView3.h code on the right

    3) An option to create a new Outlet connection will pop up.

    4) Name the connection and click connect

    It will then create a connected IBOutlet.

提交回复
热议问题