2010-07-03 44 views
1

所以我新的節目爲iPhone和我在這裏嘗試這種新的教程: http://theappleblog.com/2009/04/15/iphone-dev-sessions-create-a-navigation-based-application/Xcode中:下面的教程,但「subViewOneController」未申報的錯誤

當我生成項目,下: RootViewController.m

我在第一線得到了「subViewOneController」未申報的錯誤:

// allocate a set of views and add to our view array as a dictionary item 

SubViewOneController *subViewOneController = [[SubViewOneController alloc] init]; 

subViewOneController.title = @"Subview One"; 

是什麼錯誤呢?我應該在哪裏確保名稱匹配?

謝謝, 馬特

回答

1

你需要確保一個名爲SubViewOneController類存在,那你在RootViewController.m

進口其標題( SubViewOneController.h