Skip to content

Instantly share code, notes, and snippets.

@akio0911
Created May 14, 2009 07:44
Show Gist options
  • Save akio0911/111553 to your computer and use it in GitHub Desktop.
Save akio0911/111553 to your computer and use it in GitHub Desktop.
UIView * viewRoot = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 480, 320)];
viewRoot.backgroundColor = [UIColor clearColor];
UIView * view1 = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
UIView * view2 = [[UIView alloc] initWithFrame:CGRectMake(480-100, 0, 100, 100)];
UIView * view3 = [[UIView alloc] initWithFrame:CGRectMake(0, 320-100, 100, 100)];
UIView * view4 = [[UIView alloc] initWithFrame:CGRectMake(480-100, 320-100, 100, 100)];
[viewRoot addSubvier:view1];
[viewRoot addSubvier:view2];
[viewRoot addSubvier:view3];
[viewRoot addSubvier:view4];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment