Possible Duplicate:
Transparent Modal View on Navigation Controller
I want to make my viewController with transparent backgroundColor but i don’t have any luck..
I’ve tried to set/use…
self.view.backgroundColor = [UIColor clearColor];– still I have white colored background.self.view.alpha = .0f; – all my thing in my VC are missing but i still have white backgroundself.view.backgroundColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:.7f]and still white background below my transparent view.
EDIT1:
Tested on:
- iPad3, iOS 6.0
- iPad 6.0 Simulator
After little more researching I’ve found this approach:
Original code:
Modified code:
So as you can see i’ve using
modalPresentationStyleproperty on my ViewController which I wan’t to present, right before callpresentModalViewController:animated:NOTE: My ViewController view have size of {680, 700}
It present my ViewController view with size of
{540, 620}and because my original size bigger I have parts my borders and shadows hidden but with little modification of my view look and feel it will be okay.However this approach seems to give me what I want.
========
For more information please refer to following Apple documentation:
UIViewController Class Reference