Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2091335
  • 博文数量: 413
  • 博客积分: 10926
  • 博客等级: 上将
  • 技术积分: 3862
  • 用 户 组: 普通用户
  • 注册时间: 2006-01-09 18:14
文章分类

全部博文(413)

文章存档

2015年(5)

2014年(1)

2013年(5)

2012年(6)

2011年(138)

2010年(85)

2009年(42)

2008年(46)

2007年(26)

2006年(59)

分类:

2010-04-25 20:51:38

  1. Tutorial:
    • Interface Builder User Guide
      http://developer.apple.com/iphone/library/documentation/DeveloperTools/Conceptual/IB_UserGuide/Introduction/Introduction.html
    • xxx
  2. Introduce
    Interface Builder(IB) is a visual tool to help design your UI.
  3. Launch Interface Builder
    On Xcode, double click the file end with extension .xib
  4. What's In Nib
    • File's Owner
      It represents the object that loads the Nib file from disk. In other word, File's Owner is the object that owns this copy of Nib file.
    • First Responder
      A responder object is an object that can respond to events and handle them. UIResponder is the base class for all responder objects, also known as, simply, responders.

      The First Responder represents the object with which the user is currently interacting. In other word, it is the current focused control. ie., the user is currently enterring data into a text field, that field is current First Responder.

      The First Responder changes as the user interacts with the interface, and First Responder gives your convenient way to communicate with whatever control or view  is the current first responder without having to write code to determine which control or view that might be.
    • Other icon
      Other icon in this widow represents an object instance that will be created when the nib file loads.
  5. The Window Interface Builder
    • Library
      You can press menu Tools > Library to open library window. This is you will find all the stock Cocoa Touch objects that Interfacce Builder supports.
    • Inspector
      You can pressmenu Tools > Inspector to open inspector window. On inspector, you can set the attributes of the currently selected item.
    • ...
  6. Defien outlets in .h file
    IBOutlet UIButton *myButton;

    The IBOutlet keyword is defined like this:
    #ifndef IBOutlet
    #define IBOutlet
    #endif
    IBOutlet doesn absolutely nothins, it sole purpose is to act as a hint to tell Interface Builder that this is an interface variable that we are connect to an object in a nib file must be proceded by the IBOutlet keyword.
  7. Define action method
    - (IBAction) doSomethins:(id)sender;
    or
    - (IBAction) doSomethins;
  8. ...
阅读(1099) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~