开发者

Accessing nib/xib objects from controller

I have a UI file in xcode, a开发者_Python百科nd I have an AppDelegate class with an awakeFromNib function. From this function, is there a way to change properties of objects which are in the UI? For example, change the string of a label, textfield and so on.

Sorry for bad english, tried to explain as well as I could.

Any help would be very appreciated!

—Albé


You should read Apple's Currency Converter tutorial if you haven't already. It will give you the basics on Cocoa.

In short, you declare IBOutlets to the objects you wish to reference, and in Interface Builder, you create the connections between those outlets and the objects. After that, you can reference the objects via the outlets, which are really just pointers.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜