Why is my Modified Submitted UIVisualEffect View done in dark gray?

I am trying to use UIVisualEffectView for my modally presented view to be rendered to the user. I really don't know what's going on with the UIVisualEffectView. When the modal animation appears, it works great. But when the animation was done the effect turned to dark gray, any help with that? I've been delaying this for too long.

My Simulator, Also happen on iPhone

My Storyboard

Please, help?

Here is my source code, Download

+3


source to share


3 answers


Matching views will disappear after the modal spans them. To prevent this from happening, you need to install the UIModalPresentationStyle

mod management module on OverCurrentContext

:



ModalVC.modalPresentationStyle = UIModalPresentationStyle.OverCurrentContext

+5


source


The above answer is correct, but in my case my view controller is embedded in the navigation controller, so it doesn't work. This does:



vc.navigationController?.modalPresentationStyle = .overCurrentContext

      

+1


source


I think the problem is that you are not presenting your UIVisualEffectsView differently, but the view controller, so the gray you see is the background color of the right view controller. You can change this to the same gradient as the left one and see if that works or you will need to display your UIVisualEffectsView on your first view manager.

0


source







All Articles