Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to have transparent view controller in iOS?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 765
    Comment on it

    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.

    1. Make a storyboard segue connecting the presenting view controller and presented view controller with kind Modal Presentation.
    2. Select the segue and on the Attributes Inspector window select Over Current Context from the Presentation types list.

     

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: