NSArray *arr = [NSArray arrayWithObjects:[UIColor purpleColor],[UIColor cyanColor],[UIColor blueColor],[UIColor greenColor],[UIColor yellowColor],[UIColor orangeColor],[UIColor redColor], nil];
for (int i = 0; i < 7; i++) {
UIView *view = [[UIView alloc] initWithFrame:CGRectMake(i * (320 / 14), i * (568 / 14), 320 - i * (320 / 14) * 2, 568 - i * (568 / 14) * 2)];
view.backgroundColor = arr[i];
[self.window addSubview:view];
[view release];
}
for (int i = 0; i < 7; i++) {
UIView *view = [[UIView alloc] initWithFrame:CGRectMake(20 + i * 20 , 40 + i * 20, 280 - i * 20 * 2, 280 - i * 20 * 2)];
view.backgroundColor = [UIColor colorWithRed:(arc4random() % 256 / 128 )green:(arc4random() % 256 / 128) blue:(arc4random() % 256 /128 )alpha:0.5];
[self.window addSubview:view];
[view release];
}