for (int i =0 ; i < 7; i++) {
UIView *view = [[UIViewalloc] initWithFrame:CGRectMake(0 + i *20, 0 + i *20,320 - 40 * i ,568 - i * 40)];
CGFloat color = (arc4random() %256 /255.0 );
CGFloat saturation = ( arc4random() % 128 / 256.0 ) + 0.5;
CGFloat brightness = ( arc4random() % 128 / 256.0 ) + 0.5;
view.backgroundColor = [UIColorcolorWithHue:color saturation:saturation brightness:brightnessalpha:1];
[self.windowaddSubview:view];
[view release];
}