I have a two UIViewControllers, and I am displaying the secondViewController modally over the firstViewController. My secondViewController contains a subview which is UIView with some buttons. Now what I want to do is, make the SecondViewController semi transparent so that my firstViewController is visible and only show the subview modally which is not transparent.
Reagards Ranjit
when you present your view controller, view of previous controller is removed so if you set any alpha for your current controller's view, you will get UIWindow's background.
if you intend to play with the transparency, then instead of doing presentModalViewController
, in first viewcontroller, [self.view addSubView:controller2.view];
and make controller2.view.alpha = 0.5;//whatever transparency level u want
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With