,而不是直接推視圖控制器到TabBar,所以首先創建一個導航控制器,並用其特定的控制器
Settings *settingsVC = [[Settings alloc] init];
UINavigationController *settingsNavigationController = [[UINavigationController alloc] initWithRootViewController:settingsVC];
Report *reportVC = [[Report alloc] init];
UINavigationController *reportNavigationController = [[UINavigationController alloc] initWithRootViewController:reportVC];
Episodes *episodesVC = [[Episodes alloc] init ];
UINavigationController *episodesNavigationController = [[UINavigationController alloc] initWithRootViewController:episodesVC];
UINavigationController *homeNavigationController = [[UINavigationController alloc] initWithRootViewController:homeVC];
NSArray* controllers = [[NSArray alloc] initWithObjects:settingsNavigationController,
reportNavigationController,
episodesNavigationController,
homeNavigationController, nil];
我猜這一切被添加到KFBAppDelegate.m的RootViewController的初始化呢? – RagingGoat
添加此代碼時會出現什麼問題 – Vinodh
我還沒有添加。在我做任何事情之前,我只是驗證它需要去哪裏。 – RagingGoat