Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
A way to show a transparent modal view controller. It's not really transparent, the modal just uses a screenshot as its background.
- (void)showCard:(id)sender
[self.view.window.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *screenshot = UIGraphicsGetImageFromCurrentImageContext();
UIViewControllerSubclass *card = [[UIViewControllerSubclass alloc] init];
card.background = screenshot;
[self presentModalViewController:card animated:NO];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment