I have a simple iOS application NavigationController. Two UICollectionViews, one by one. If you click an item in the βfirst collection,β the second collection will open . β Pretty simple.
Important Note:
"Both UICollectionViewshave a transparent background. The common background color is used for NavigationController(Inherited class from UINavigationController)"
Problem:
If understood correctly, the push method NavigationControllerworks in accordance with the algorithm:
- A compression view is created.
- Transparent gray overlay created on top .
- NavigationController pushes the view with standard animation. (The gray overlay is still there)
- The gray overlay disappears.
(If you click on a transparent background, a gray vertical line is visible )
Screenshot
Next step:
I tried to solve this problem by overriding the push method. Here is what I have:
- (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 method creates its own push animation, but there were other standard animations that I canβt remove. (Blackout when presenting and hiding views)
Screenshots_1_and_2
Question:
"How can I click on the ViewController without fading, dimming, or other animation filters?"
Topic Named Solutions ( stackoverflow.com )
- iOS 7
UINavigationControllerClick Animated Shadow - iOS 7 shows black background in custom animation for navigation
Does not work.