user2636197 user2636197 - 1 month ago 13
iOS Question

What is the difference between the modal presentation style "over current context" and "over fullscreen"?

I wonder what the difference between current context and over fullscreen is?

When I switch between them I don't see any changes in my app. All the animations look the same etc.

Answer

fullScreen:
The presented view covers the screen (fullscreen).

currentContext:
The UIModalPresentationCurrentContext style covers a specific view controller in your interface. When using the contextual style, you designate which view controller you want to cover by setting its definesPresentationContext property to true.

When presenting a view controller using the UIModalPresentationFullScreen style, UIKit normally removes the views of the underlying view controller after the transition animations finish. You can prevent the removal of those views by specifying the UIModalPresentationOverCurrentContext style instead. You might use that style when the presented view controller has transparent areas that let underlying content show through.

Read more about presenting viewControllers here.