So i decided to try and build an iPhone application using StoryBoarding. And i got a basic tab-based application set up, quite fast.
TabBar controller as initial View controller with two tabs. On each tab some more views attached as content.
On one tab i have navigation controller that has few more views following. Here i have no problems. I can move back and forth using custom buttons and navigation bar. Also TabBar is always at its place during all movements through the views.
Then i got the second tab. No Navigation controller here, because, on second tab I need to use custom seques to create custom transition animations between views. No problem with seques, animations and transitions so far(at least i almost got the animation i need :) ). But where i'm stuck is that TabBar. As soon as I press any button that will navigate to another view using custom seque i lose my TabBar. Even if i navigate back to initial view there are no TabBar anymore.
I've read something about popping up the tabbar controller in the views stack, but all samples I could find just did not work for me.
If anyone got stuck with similar thing, please share the solution. Any pointing to some good tutorial or sample would be very appreciated.
edit: So my custom seque looks like this:
my "(void)perform" looks something like this: (at least it animates from source to destination as expected. the only thing that is wrong, is that TabBar gets hidden or dismissed)
#import "XCustomSeque.h"
#import <QuartzCore/QuartzCore.h>
@implementation XCustomSeque
@synthesize appDelegate=_appDelegate;
-(void) perform{
UIViewController *srcViewController = (UIViewController *) self.sourceViewController;
UIViewController *destViewController = (UIViewController *) self.destinationViewController;
self.appDelegate = [[UIApplication sharedApplication] delegate];
CATransition* trans = [CATransition animation];
[trans setType:kCATransitionMoveIn];
[trans setFillMode:kCAFillModeBoth];
[trans setDuration:1];
[trans setSubtype:kCATransitionFromLeft];
CALayer *layer = destViewController.view.layer;
[srcViewController.view removeFromSuperview];
[self.appDelegate.window addSubview:destViewController.view];
[layer addAnimation:trans forKey:nil];
self.appDelegate.window.rootViewController=destViewController;
}
@end