網頁

2012年3月13日 星期二

Xcode 4.2 TableViewController


Tutorial: Storyboard in XCode 4.2 with Navigation Controller and Tabbar Controller (Part 1)



Tutorial: Storyboard in XCode 4.2 with Navigation Controller and Tabbar Controller (Part 2)




    // A cell identifier which matches our identifier in IB
    static NSString *CellIdentifier = @"CellIdentifier";

create a new file (File -> New -> New file).  ChooseUIViewController subclass.  Give it a class name of Tab2_ItemViewController and untick both boxes.  




Tab2_ItemViewController - (void)viewDidLoad 一開始為註解記得解開

xCode4.2下添加TableViewController会出现”Prototype cells“警告

ShowSelectedMovie 一定要mactch Storyboard Segue 的identifier名稱設定


// Do some customisation of our new view when a table item has been selected
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    // Make sure we're referring to the correct segue
    if ([[segue identifier] isEqualToString:@"ShowSelectedMovie"]) {


在使用xCode4.2编码的过程中,发现新添加TableViewController控制器后,xCode会报警告错误:

当你在table view cell属性面板中设置了identifiers值,则xcode会自动关闭此警告信息。



空白view 內拉進一個table view 後 拉關係的關聯

 push時不用release 因為pop時候會自動釋放
先解析設定 再push  (避免一直read 一次read改用search更省)

沒有留言:

張貼留言

注意:只有此網誌的成員可以留言。