Created
May 9, 2017 16:32
-
-
Save AllieCarver/fcb4ce936b1b2bec02dff8b9fd0b33a9 to your computer and use it in GitHub Desktop.
This file contains 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
CGRect viewRect = CGRectMake(0, 0, 100, 100); | |
UIColor * greyColor = [UIColor colorWithRed:230.0/255.0 green:230.0/255.0 blue:230.0/255.0 alpha:1.0]; | |
[greyColor setFill]; | |
UIRectFill( viewRect ); | |
UIViewController *rootViewController = [[UIApplication sharedApplication] keyWindow].rootViewController; | |
UIView* myView = [[UIView alloc] initWithFrame:viewRect]; | |
myView.backgroundColor = greyColor; | |
[rootViewController.view addSubview:myView]; | |
return self; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment