Created
November 17, 2010 11:49
-
-
Save mikeplate/703307 to your computer and use it in GitHub Desktop.
Set rounded rect for all subviews and background color for buttons, iOS
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
#import <QuartzCore/QuartzCore.h> | |
- (void)viewDidLoad { | |
[super viewDidLoad]; | |
for (UIView *subview in [self.view subviews]) { | |
subview.layer.cornerRadius = 10; | |
if ([subview isKindOfClass:UIButton.class]) | |
[subview setBackgroundColor:[UIColor colorWithRed:0.33 green:0.33 blue:0.9 alpha:1.0]]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment