0

I have a UI file in xcode, and 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é

4

1 に答える 1

1

まだ読んでいない場合は、AppleのCurrencyConverterチュートリアルを読む必要があります。それはあなたにココアの基本を与えるでしょう。

つまり、参照するオブジェクトに対してIBOutletsを宣言し、Interface Builderで、それらのアウトレットとオブジェクトの間に接続を作成します。その後、実際には単なるポインタであるアウトレットを介してオブジェクトを参照できます。

于 2009-12-02T18:13:33.687 に答える