(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];
}
}