현재 IOS 프로 그램을 배우고 있고 현재 두 개의 현재 뷰 컨트롤러에서 탭형 뷰 컨트롤러를 설정하는 방법을 모른다. 누군가 도와 줄 수 있어요. 더 많은 정보가 필요하면 알려주세요. 이 UINAvigationController 각각에 대해 하나씩 두 개의 탭만 있으면됩니다.앱 뷰어에서 탭형 뷰 컨트롤러를 사용하도록 수정
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
/*
This is how you set up with movies at root
*/
NSString *moviesURLString = @"irrelevantURL";
self.movieDataSource = [[MoviesDataSource alloc] initWithMoviesAtURLString:moviesURLString];
MoviesTableViewController *mvc = [[MoviesTableViewController alloc] init];
UINavigationController *mnc = [[UINavigationController alloc] initWithRootViewController:mvc];
// [self.window setRootViewController:mnc];
/*
This is how you set up with theaters at root
*/
NSString *theatersURLString = @"irrelevantURL";
self.movieTheaterDataSource = [[MovieTheaterDataSource alloc] initWithMovieTheatersAtURLString:theatersURLString];
MovieTheaterTableViewController *mtvc = [[MovieTheaterTableViewController alloc] init];
UINavigationController *mtnc = [[UINavigationController alloc] initWithRootViewController:mtvc];
// [self.window setRootViewController:mtnc];
/*
Trying to set up tabbed views
*/
UITabBar *tabbedView = [[UITabBar alloc] init];
return YES;
}
그러나 tabvc.viewControllers = [NSArray arrayWithObjects : mnc, mtnc, nil];과 같이 tabvc를 초기화해야했는데이를 변경하거나 'tabvc.viewControllers = [mnc, mtnc]; "Expected Identifier"오류가 있습니다. 잘못 표시했습니다. – preezzzy
죄송합니다. 해당 배열을 입력합니다. –