I have a simple iOS NavigationController
based application. Two UICollectionViews
, one after another. If element on "first collection" was clicked, the "second collection" will be opened.
Quite simple.
Important note:
"Both UICollectionViews
have transparent background. General background color for navigationController
is used. (Inherited class from UINavigationController
)"
The problem:
If understood it right, push method of NavigationController
works according to algorithm:
(If pushing view has transparent background, a gray vertical line is visible)
Screenshot
Next step: I've tried to solve this problem by overriding push method. Here's what I've got:
- (void)pushViewController:(UIViewController *)viewController
animated:(BOOL)animated
{
CATransition *transition = [CATransition animation];
transition.duration = 0.45;
transition.timingFunction = [CAMediaTimingFunction
functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
transition.type = kCATransitionPush;
transition.subtype = kCATransitionFromRight;
transition.fillMode = kCAFillModeForwards;
transition.delegate = self;
[self.view.layer addAnimation:transition forKey:nil];
[super pushViewController:viewController animated:animated];
}
This way creates its own push animation, but there were another standard animations used, which I can't remove. (Blackout on presenting and hiding views)
Screenshots_1_and_2
Question: "How can I push ViewController, without fading, blackout, and other animation filters?"
Solutions with theme names (on stackoverflow.com)
UINavigationController
Push animation shadow Don't work.
Don't override the push method. iOS7 allows you to provide animation controllers for custom transitions. See here for more details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With