- (void)jiugongge{ NSArray *array =@[[UIColor cyanColor],[UIColor lightGrayColor], [UIColor yellowColor],[UIColor purpleColor], [UIColor blueColor],[UIColor greenColor], [UIColor blackColor],[UIColor magentaColor], [UIColor magentaColor] ]; for (int i=0; i<9; i++) { UIView *view = [[UIView alloc]initWithFrame:CGRectMake(i%3*50+100, i/3*50+100, 30, 30)]; view.backgroundColor = array[i]; [self.view addSubview:view]; } }
用户登录
还没有账号?立即注册
用户注册
投稿取消
文章分类: |
|
还能输入300字
上传中....