Last active
January 3, 2016 10:59
-
-
Save cyndibaby905/8453396 to your computer and use it in GitHub Desktop.
How to write a modal view
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UIViewController* avc = [[UIViewController alloc] init]; | |
UIView *view = [[UIView alloc] initWithFrame:CGRectMake(50,50,100,100)]; | |
view.backgroundColor = [UIColor redColor]; | |
[avc.view addSubview:view]; | |
UIWindow* ow = [[UIWindow alloc] initWithFrame: [UIScreen mainScreen].bounds]; | |
ow.windowLevel = UIWindowLevelAlert; | |
ow.backgroundColor = [UIColor clearColor]; | |
ow.rootViewController = avc; | |
[ow makeKeyAndVisible]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment