Created
January 30, 2016 07:36
-
-
Save arkilis/9f9889fb03e890146b2a 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
- (void)viewDidLoad { | |
[super viewDidLoad]; | |
// Do any additional setup after loading the view, typically from a nib. | |
UIView *sv= self.view; | |
UIView *view1= [[UIView alloc] init]; | |
[sv addSubview:view1]; | |
view1.backgroundColor= [UIColor colorWithRed:0 green:0 blue:0 alpha:1.0]; | |
[view1 mas_makeConstraints:^(MASConstraintMaker *make) { | |
make.top.equalTo(@([[UIApplication sharedApplication] statusBarFrame].size.height)); | |
make.left.equalTo(sv).with.offset(20); | |
make.right.equalTo(sv).with.offset(-20); | |
make.height.equalTo(sv.mas_height).with.multipliedBy(0.5); | |
}]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment