通过UIview多视图的叠加,灵活利用UIView的属性值,NStimer的控制,输出多彩的霓虹灯效果
前半部分,UIView的实现并不难,代码也很好理解
@interface RootViewController ()
{
UIView *aView;
UIView *bView;
UIView *cView;
UIView *dView;
UIView *eView;
UIView *fView;
UIView *gView;
}
@end
- (void)viewDidLoad
{
[super viewDidLoad];
aView=[[UIView alloc]initWithFrame:CGRectMake(0, 0, 320, 460)];
[aView setBackgroundColor:[UIColor redColor]];
[self.view addSubview:aView];
[aView release];
bView=[[UIView alloc]initWithFrame:CGRectMake(20, 20, 280, 420)];
[bView setBackgroundColor:[UIColor blueColor]];
[aView ad