I have an application that allows users to view photos in UICollectionViewControllerbuilt-in inside UINavigationController. When a user clicks to view a photo, I introduce a new view controller across the entire screen (not the default). Now I want to implement the 3D Touch commit (pop) view controller so that it displays just like when the user just stole a photo. The problem is that when you pop up on a full-screen iOS image, behind the scenes, it presses this view controller on the stack - the navigation bar is still visible and adds a return button to return to the previous screen. I don't want this, I want the commit view controller to be represented modally.
I noticed that if I remove the navigation controller, iOS will present a fix type controller instead of using it. But I can’t delete my navigation controller, and it still just doesn’t display in full screen mode on the whole screen.
How do I change the default behavior so that the commit view controller is presented in Full Screen format instead of being pushed onto the stack when the built-in view controller is built into the navigation controller?
I tried to set modalPresentationStylein .OverFullScreenwhen I configure the commit view controller in previewingContext:commitViewController:. It didn't seem to make any difference.
The current behavior is a problem for several reasons:
- I present in full screen, so that the main controller of visibility is still visible from below, blurry. When he pushes this effect, it cannot be achieved.
- I present a full-screen photo using a custom transition using UIViewControllerTransitioningDelegate, and it goes on even after being fired. When you reject this after clicking, it only performs the default animation by default instead of my custom animation.
source
share