Reputation: 1161
How does one set the size of a UIViewController view so that the view behind it is visible? Or will setting a UIViewControllers view to clear, allow for the view below it in the display stack to be visible?
Upvotes: 0
Views: 213
Reputation: 2884
Changing the alpha of the UIViewController will affect everything that you place on the controller -- and that may not be what you want. What you can do is to make the view's background clear, then add another view with a suitable background color (black, white or whatever), and change the alpha of that view to make it translucent. You can then place controls on top of the translucent view and they will be opaque. The results look like this:
Upvotes: 0
Reputation: 17877
Size of view is set using its frame
property.
You can play with alpha
property of that view to change its transparency.
Upvotes: 3
Reputation: 20177
This previous question and the one it links to suggests what you want may not be possible, if you are thinking that the parent view is just occluded by the current view and not removed?
Upvotes: 0