Sealyu

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

            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
            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
          主站蜘蛛池模板: 杭锦后旗| 平武县| 通州区| 新巴尔虎左旗| 外汇| 廊坊市| 杂多县| 虞城县| 晋宁县| 莱芜市| 安龙县| 申扎县| 泾源县| 淳化县| 莎车县| 宝鸡市| 迭部县| 忻州市| 柏乡县| 曲水县| 尼木县| 固始县| 富阳市| 伊宁市| 西昌市| 虞城县| 彰化县| 平塘县| 福安市| 潼关县| 涞源县| 东兴市| 民乐县| 奉新县| 四川省| 白水县| 马鞍山市| 获嘉县| 陕西省| 新巴尔虎右旗| 平塘县|