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 閱讀(286) 評論(0)  編輯  收藏 所屬分類: iPhone
          主站蜘蛛池模板: 建阳市| 新乡市| 治县。| 清水县| 云龙县| 无锡市| 阿图什市| 虹口区| 曲沃县| 靖宇县| 清远市| 舒城县| 察雅县| 晋中市| 兴国县| 鹤山市| 合山市| 宁武县| 青龙| 门头沟区| 沧州市| 宁都县| 大余县| 遂川县| 海门市| 大港区| 宕昌县| 彭阳县| 迁西县| 河东区| 九龙城区| 临朐县| 隆尧县| 汉川市| 锡林郭勒盟| 张家口市| 鄯善县| 济源市| 辛集市| 图们市| 福贡县|