If it helps you, here is a workaround I used to get rid of some push issues from subviews. I use a modal segue, with push animation.
You can call them like: [myAnimations modalRight:self destvc:yourDestViewController]. To segue back, from yourDestViewController: [myAnimations modalLeft:self];
myAnimations.h
#import <Foundation/Foundation.h>
@interface myAnimations : NSObject
@end
myAnimations.m
#import "myAnimations.h"
#import <QuartzCore/QuartzCore.h>
@implementation myAnimations
+(void) modalRight:(UIViewController*)vc destvc:(UIViewController*)viewCtrl{
CATransition *transition = [CATransition animation];
transition.duration = 0.3;
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
transition.type = kCATransitionPush;// kCATransitionMoveIn;
transition.subtype = kCATransitionFromRight;
[vc.view.window.layer addAnimation:transition forKey:nil];
[vc presentModalViewController:viewCtrl animated:NO];
}
+(void) modalLeft:(UIViewController*)vc{
CATransition *transition = [CATransition animation];
transition.duration = 0.3;
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
transition.type = kCATransitionPush;
transition.subtype = kCATransitionFromLeft;
[vc.view.window.layer addAnimation:transition forKey:nil];
[vc dismissModalViewControllerAnimated:NO];
}
@end
UPDATE: now with IOS 7 and it's nice push animation, the method above will make it look strange. If you want to present modally a viewcotroller that needs to push something (let's call it pusherVC), embed pusherVC in a navigation controller, and present modal the pusher's navigation controller. Then, @ pusherVC you can do self.nafigationcontroller present...
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…