iOS 霓虹灯效果(同种颜色依次向外扩展)
来源:互联网 发布:优酷网软件下载 编辑:程序博客网 时间:2024/04/24 20:20
#import "ZXHAppDelegate.h"<span style="font-size:18px;">@implementation ZXHAppDelegate- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // Override point for customization after application launch. /* NSArray *arr = [NSArray arrayWithObjects:[UIColor redColor],[UIColor orangeColor],[UIColor yellowColor],[UIColor greenColor],[UIColor cyanColor],[UIColor blueColor],[UIColor purpleColor], nil]; for (NSInteger i = 0; i < 7; i ++) { UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0 + i * 20, 0 + i *20, 320 - 40 * i , 568 - i * 40)]; view.backgroundColor = arr[random()%6]; [self.window addSubview:view]; [view release];} */ //红色视图 UIView *redView=[[UIView alloc] initWithFrame:CGRectMake(0, 153, 320, 320)]; redView.backgroundColor=[UIColor redColor]; redView.tag = 101; [self.window addSubview:redView]; [redView release]; //橙色视图 UIView *oriangeView=[[UIView alloc] initWithFrame:CGRectMake(20, 20, 280, 280)]; oriangeView.backgroundColor=[UIColor orangeColor]; oriangeView.tag = 102; [redView addSubview:oriangeView]; [oriangeView release]; //黄色视图 UIView *yellowView=[[UIView alloc] initWithFrame:CGRectMake(20, 20, 240, 240)]; yellowView.backgroundColor=[UIColor yellowColor]; yellowView.tag = 103; [oriangeView addSubview:yellowView]; [yellowView release]; //绿色视图 UIView *greenView=[[UIView alloc] initWithFrame:CGRectMake(20,20, 200, 200)]; greenView.backgroundColor=[UIColor greenColor]; greenView.tag = 104; [yellowView addSubview:greenView]; [greenView release]; //青色视图 UIView *cyanView=[[UIView alloc] initWithFrame:CGRectMake(20, 20, 160, 160)]; cyanView.backgroundColor=[UIColor cyanColor]; cyanView.tag = 105; [greenView addSubview:cyanView]; [cyanView release]; //蓝色视图 UIView *blueView=[[UIView alloc] initWithFrame:CGRectMake(20, 20, 120, 120)]; blueView.backgroundColor=[UIColor blueColor]; blueView.tag = 106; [cyanView addSubview:blueView]; [blueView release]; //紫色视图 UIView *purpleView=[[UIView alloc] initWithFrame:CGRectMake(20, 20, 80, 80)]; purpleView.backgroundColor=[UIColor purpleColor]; purpleView.tag = 107; [blueView addSubview:purpleView]; [purpleView release]; [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(Ltime) userInfo:nil repeats:YES]; self.window.backgroundColor = [UIColor whiteColor]; [self.window makeKeyAndVisible]; return YES;}- (void)Ltime{ UIColor *temp = [self.window viewWithTag:101].backgroundColor; for (int i = 0; i < 6; i++) { [self.window viewWithTag:101 + i].backgroundColor = [self.window viewWithTag:102 + i].backgroundColor; } [self.window viewWithTag:107].backgroundColor = temp;}</span>
0 0
- iOS 霓虹灯效果(同种颜色依次向外扩展)
- IOS 霓虹灯效果
- IOS 霓虹灯效果(oc)
- 霓虹灯效果
- ios霓虹灯效果(没基础也可以做出好看的霓虹灯)
- 霓虹灯效果(UIView)
- 3种霓虹灯效果
- Android霓虹灯效果
- 文字霓虹灯效果
- 安卓霓虹灯效果
- 简单的霓虹灯效果
- android 霓虹灯效果
- js实现霓虹灯效果
- 字体霓虹灯效果
- ios 颜色渐变效果
- iOS颜色渐变效果
- 霓虹灯 随机颜色 定时器nstimer
- 霓虹灯颜色渐变flash素材
- 机器学习中的算法(2)-支持向量机(SVM)基础
- c++ primer 第三章 标准库类型 string
- Android毛玻璃效果侧滑菜单
- Git 常用命令
- 运放的相位补偿
- iOS 霓虹灯效果(同种颜色依次向外扩展)
- ICT工作有感<二>
- UI中霓虹灯效果代码
- 马云用这10句话骂醒员工
- HDU 4975 (杭电多校 #10 1005题)A simple Gaussian elimination problem.(网络流之最大流)
- Box2D C++ DebugDraw
- IOS开发——UIKit
- 为多级指针分配内存
- 北京十年诚信房产证信誉第一身份证电话 13611766320