Sealyu

          --- 博客已遷移至: http://www.sealyu.com/blog

            BlogJava :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
            618 隨筆 :: 87 文章 :: 225 評論 :: 0 Trackbacks
          When a nib is loaded, the nib loader allocates and initializes all objects, then hooks up all of their outlets and actions. Because of the order in which this happens, you cannot access outlets in your initializer. You can try, but they will all be nil.

          After all outlets and actions are connected, the nib loader sends awakeFromNib to every object in the nib. This is where you can access outlets to set up default values or do configuration in code. Example:

          - (void)awakeFromNib
          {
          [buttonOutlet setPeriodicDelay:2 interval:0.5];
          [textFieldOutlet setStringValue:@"Hello world!"];
          }
          posted on 2010-10-28 10:58 seal 閱讀(285) 評論(0)  編輯  收藏 所屬分類: iPhone
          主站蜘蛛池模板: 湾仔区| 河津市| 洱源县| 类乌齐县| 凤翔县| 石渠县| 瓦房店市| 中宁县| 新闻| 同江市| 白朗县| 土默特左旗| 桃园市| 黑山县| 托克逊县| 太谷县| 平山县| 英吉沙县| 平罗县| 兴宁市| 石阡县| 长白| 遵义市| 齐齐哈尔市| 和林格尔县| 清水县| 桃源县| 太谷县| 宁陵县| 瑞丽市| 霍州市| 恩施市| 玛纳斯县| 烟台市| 田东县| 乃东县| 抚顺县| 定南县| 静安区| 额济纳旗| 浠水县|