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 閱讀(291) 評論(0)  編輯  收藏 所屬分類: iPhone
          主站蜘蛛池模板: 开化县| 文登市| SHOW| 高淳县| 龙州县| 定南县| 克拉玛依市| 韩城市| 防城港市| 中西区| 涿鹿县| 泽普县| 昭平县| 深州市| 迁安市| 巴东县| 广宗县| 安阳县| 高雄市| 乌拉特中旗| 云和县| 星子县| 宜都市| 蒙城县| 夏津县| 盘锦市| 凌源市| 夏河县| 岗巴县| 岳阳市| 温泉县| 达州市| 呼玛县| 汾西县| 建始县| 改则县| 靖边县| 常熟市| 宁陵县| 中西区| 兰坪|