UIView *view1 = [[UIView alloc]initWithFrame:CGRectMake(80, 80,200,200)];
view1.backgroundColor = [UIColor greenColor];[self.window addSubview:view1];
[view1 release];
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
UIView *view = [[UIView alloc]initWithFrame:CGRectMake(80+i*50,80 + j * 50, 50, 50)];
view.backgroundColor = [UIColor yellowColor];
if ((i+j)%2 == 0) {
[self.window addSubview:view];
[view release];
}
}
}