Last active
January 30, 2016 07:48
-
-
Save arkilis/96faa6e5cceeeebed663 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(self.mas_topLayoutGuide); | |
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