At times we might need to have a transparent view controller i.e to have contents of presenting view controller visible along with the presented view controller. One of such cases can be when we have to show some popup with blurred background like in the screenshot below.
To have this kind of functionality either we will have a blurred overlay view and an image view above it. Or we can have another view controller and then we take a snapshot of the presenting view controller and use that snapshot on our view controller. But a better way here can be using storyboard segue with presentation of style Over Current Context. We don't need to do much for it.
Make a storyboard segue connecting the presenting view controller and presented view controller with kind Modal Presentation.
Select the segue and on the Attributes Inspector window select Over Current Context from the Presentation types list.
0 Comment(s)