Created
July 27, 2013 01:56
-
-
Save jontelang/6093349 to your computer and use it in GitHub Desktop.
asd
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
UIView *re = [[UIView alloc] initWithFrame:[UIScreen mainScreen].bounds]; | |
re.backgroundColor = [UIColor redColor]; | |
re.layer.borderWidth = 2; | |
re.layer.borderColor = [UIColor greenColor].CGColor; | |
self.view = re; | |
[self.view setAutoresizesSubviews:YES]; | |
[self.view setAutoresizingMask:UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight]; | |
[re release]; | |
//[self.view setAutoresizesSubviews:YES]; | |
//[re setAutoresizingMask:UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight]; | |
//[self.view addSubview:re]; | |
NSLog(@"self.view %@",self.view); | |
UIView *re2 = [[UIView alloc] initWithFrame:CGRectMake(10,10,50,50)]; | |
[re2 setAutoresizingMask:UIViewAutoresizingFlexibleBottomMargin]; | |
re2.backgroundColor = [UIColor greenColor]; | |
[self.view addSubview:re2]; | |
UIView *re3 = [[UIView alloc] initWithFrame:CGRectMake(((UIView*)self.view).frame.size.width - 60,10,50,50)]; | |
[re3 setAutoresizingMask:UIViewAutoresizingFlexibleRightMargin]; | |
re3.backgroundColor = [UIColor blueColor]; | |
[self.view addSubview:re3]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment