I have a case where I need to open a new UIViewController on IBAction. This new UIViewController is supposed to be transparent. When I do a normal modal transition it hides the old UIViewController. Any suggestions on this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
For your purposes you will want to tell your modal View Controllers view property to change alpha. (best done in the view controllers
viewDidLoad)It’s as simple as:
Now, the other approach would be to just use a new
UIViewadded as a subview of your main view controller. The following will show your how to animate it in.EDIT: To change the alpha of the background view and preserve the alpha of its subviews, try setting it up like this.