How to link a .xib file to a class file with Xcode 4

前端 未结 4 1533
陌清茗
陌清茗 2020-12-08 10:12

have started a universal project under the new Xcode4. My Application works on both iPhone & iPad devices but not well design for the iPad. I have 2 .xib file for the Ma

4条回答
  •  失恋的感觉
    2020-12-08 10:47

    The correct answer was given by user763308:

    To link a .xib to a class under Xcode4:

    1. Open your .xib.
    2. In placeholder: select File's Owner.
    3. In the third thumbnail:"Identity Inspector" of the right panel, edit the "Custom Class" field and enter the name of your class.

    I also then had to:

    1. Click the root view under Objects.
    2. Click the last tab: "Show Connections".
    3. Drag "New referencing outlet" to "File's Owner" and select "view".

提交回复
热议问题