TrollStore/Store/TSRootViewController.m

27 lines
990 B
Objective-C

#import "TSRootViewController.h"
#import "TSAppTableViewController.h"
#import "TSSettingsListController.h"
@implementation TSRootViewController
- (void)loadView {
[super loadView];
TSAppTableViewController* appTableVC = [[TSAppTableViewController alloc] init];
appTableVC.title = @"Apps";
TSSettingsListController* settingsListVC = [[TSSettingsListController alloc] init];
settingsListVC.title = @"Settings";
UINavigationController* appNavigationController = [[UINavigationController alloc] initWithRootViewController:appTableVC];
UINavigationController* settingsNavigationController = [[UINavigationController alloc] initWithRootViewController:settingsListVC];
appNavigationController.tabBarItem.image = [UIImage systemImageNamed:@"square.stack.3d.up.fill"];
settingsNavigationController.tabBarItem.image = [UIImage systemImageNamed:@"gear"];
self.title = @"Root View Controller";
self.viewControllers = @[appNavigationController, settingsNavigationController];
}
@end