用ios代码做view

import“ViewController.h"

@interface ViewController()

@end

@implementation ViewController

-(void)viewDidload

{

[super viewDidload];

UIView *redview=[[UIView alloc]init];

redview.frame=CGRectMake(0,0,300,100);

redview.backgroundcolor=[UIColor redColor];

[self.view addSubview:redview];

UIView *greenview=[[UIView alloc]init];

greenview.frame=CGRectMake(0,100,150,100);

greenview.backgroundColor=[UIColor greenColor];

[redview addSubview:greenview];

UIView *whiteview=[[UIView alloc]init];

whiteview.frame=CGRectMake(150,100,150,100);

whiteview.backgroundColor=[UIColor blackColor];

[self.view addSubview:whiteview];

}用ios代码做view

用ios代码做view,布布扣,bubuko.com

用ios代码做view

上一篇:Trapping Rain Water


下一篇:Eureka 的 Application Client 客户端的运行示例