- (void) hydrateDetailViewData {
//if detail view is hydrated then do not get it from database
if(isDetailViewHydrated) return;
if(detailStmt == nil) {
const char *sql = "select snapTitle, snapDesc from Snap where snapID =?";
if(sqlite3_prepare_v2(database, sql, -1, &detailStmt, NULL) != SQLITE_OK)
NSAssert1(0, @"Error while creating detail view statement. '%s'", sqlite3_errmsg(database));
NSLog(@"SQLite= %d", sqlite3_step(detailStmt));
}
if (sqlite3_step(detailStmt) == SQLITE_ROW)//execute sql statement on database, and make sure it executed properly.
{
self.snapDescription = [NSString stringWithUTF8String:(char *)sqlite3_column_text(detailStmt, 1)];
}
看着上面的代码,谁能告诉我什么是错的,那为什么我不能让它在我的DetailView加载?我基本上沿袭上iPhone SDK的article..but教程但我有这个不知道为什么错误。
如果能跟大家需要看看我甚至可以把我的项目。
错误信息:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] was unable to load a nib named "DetailView"'
2010-03-15 16:35:55.202 Snap2Play[58213:20b]