How to load UIViewController with transparent Background color? So that previous view controller can be visible. I have tried creating custom view with below method but it does not work.
- (void)drawRect:(CGRect)rect
{
// Drawing code
CGContextRef ctx = UIGraphicsGetCurrentContext();
CGContextSaveGState(ctx);
{
CGColorRef colorRef=[UIColor clearColor].CGColor;
CGContextSetFillColorWithColor(ctx, colorRef);
// CGColorRelease(colorRef);
CGContextFillRect(ctx, rect);
}
CGContextRestoreGState(ctx);
}
Any help will be appreciable!