Tabbed View with View Controllers


#1

Is there a good way of using the SEssentialsTabbedView when each tab will have a unique view controller?   Currently if I load my VC from a story board, add it to the controle, none of the “view management” activities get called(loadview, viewDidLoad etc…).

.h

@property (nonatomic, strong) SEssentialsTabbedView *clientTabView;

.m

self.clientTabView = [[SEssentialsTabbedView alloc] initWithFrame:CGRectInset(self.mainView.bounds, 0,0)];;
self.clientTabView.dataSource = self;
self.clientTabView.editable=false;
[self.mainView addSubview:self.clientTabView];

self.clientGoalsViewController = [storyboard instantiateViewControllerWithIdentifier:@“ClientGoals”];

SEssentialsTab *myTab = [[SEssentialsTab alloc] initWithName:text icon:nil];
[self.mapTabToView setObject:view forKey:[NSValue valueWithNonretainedObject:clientGoalsViewController.view]];
[self.clientTabView addTab:clientGoalsViewController.view];


#2

Hi there,

To do this you would have to manage the view controllers yourself and then when adding the views to the tab, ensure you add the view from the view controllers you’ve created. From here you’ll be able to get access to your view management methods.

Kind regards,

Matt / iOS Developer