开发者

Telling Interface Builder about custom objects. Xcode 4.0.2

开发者 https://www.devze.com 2023-03-14 01:27 出处:网络
Created a custom object and am trying to connect action to button. The guide I am following states: \"To tell the interface builder about custom objects, choose the File, Read Class Files menu item (

Created a custom object and am trying to connect action to button. The guide I am following states:

"To tell the interface builder about custom objects, choose the File, Read Class Files menu item (option cmd R) and select the header file c开发者_运维知识库ontaining the custom objects' interface declaration. In this case, choose the CalculatorController.h file"

Then I should be able to see the actions in the Inspector. I am not seeing anything. I do not understand the part that says "choose the File, Read Class Files menu item (option cmd R) and select the header file containing the custom objects' interface declaration." I am using Xcode 4.0.2 so the keyboard shortcut has a different function.

Any ideas so I can continue my journey into the iOS SDK?

THanks

dg


That guide you are reading is for pre Xcode 4.0 interface builder. In 4.0+ go to the Object Library and drag in an Object. It should look like a blue cube. After that simply set the owner of that object to you class, then you should be able to connect actions from that object to your UI.

0

精彩评论

暂无评论...
验证码 换一张
取 消