iOS UI01_色彩变换
来源:互联网 发布:nginx结合 zookeeper 编辑:程序博客网 时间:2024/05/23 19:16
//
// AppDelegate.m
// 作业_彩色变换
//
// Created by dllo on 15/7/29.
// Copyright (c) 2015年 zhozhicheng. All rights reserved.
//
#import "AppDelegate.h"
@interface AppDelegate ()
@end
@implementation AppDelegate
-(void)dealloc
{
[_window release];
[superdealloc];
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindowalloc] initWithFrame:[[UIScreenmainScreen] bounds]];
// Override point for customization after application launch.
self.window.backgroundColor = [UIColorwhiteColor];
[self.windowmakeKeyAndVisible];
[_window release];
UIView *view1=[[UIViewalloc] initWithFrame:CGRectMake(20, 20, 300, 300)];
view1.backgroundColor=[UIColorblackColor];
[self.windowaddSubview:view1];
[view1release];
UIView *view2=[[UIViewalloc] initWithFrame:CGRectMake(40, 40, 260, 260)];
view2.backgroundColor=[UIColoryellowColor];
[self.windowaddSubview:view2];
[view2release];
UIView *view3=[[UIViewalloc] initWithFrame:CGRectMake(60, 60, 220, 220)];
view3.backgroundColor=[UIColorblueColor];
[self.windowaddSubview:view3];
[view3release];
UIView *view4=[[UIViewalloc] initWithFrame:CGRectMake(80, 80, 180, 180)];
view4.backgroundColor=[UIColorredColor];
[self.windowaddSubview:view4];
[view4release];
UIView *view5=[[UIViewalloc] initWithFrame:CGRectMake(100, 100, 140, 140)];
view5.backgroundColor=[UIColororangeColor];
[self.windowaddSubview:view5];
[view5release];
UIView *view6=[[UIViewalloc] initWithFrame:CGRectMake(120, 120, 100, 100)];
view6.backgroundColor=[UIColorcyanColor];
[self.windowaddSubview:view6];
[view6release];
UIView *view7=[[UIViewalloc] initWithFrame:CGRectMake(140, 140, 60, 60)];
view7.backgroundColor=[UIColorgreenColor];
[self.windowaddSubview:view7];
[view7release];
view1.tag=1;
view2.tag=2;
view3.tag=3;
view4.tag=4;
view5.tag=5;
view6.tag=6;
view7.tag=7;
NSTimer *timer=[NSTimerscheduledTimerWithTimeInterval:0.5
target:selfselector:@selector(changeColor)userInfo:nilrepeats:YES];
return YES;
}
-(void)changeColor
{
UIColor *color =[self.windowviewWithTag:7].backgroundColor;
for (int i=6; i>0; i--) {
[self.windowviewWithTag:i+1].backgroundColor=[self.windowviewWithTag:i].backgroundColor;
}
[self.windowviewWithTag:1].backgroundColor=color;
}
- (void)applicationWillResignActive:(UIApplication *)application {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}
- (void)applicationDidEnterBackground:(UIApplication *)application {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
- (void)applicationWillEnterForeground:(UIApplication *)application {
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}
- (void)applicationDidBecomeActive:(UIApplication *)application {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}
- (void)applicationWillTerminate:(UIApplication *)application {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
@end
- iOS UI01_色彩变换
- IOS - 文字色彩
- iOS-色彩UIColor
- IOS-文字色彩UIColor
- IOS-文字色彩UIColor
- 车道线检测---色彩空间变换
- RGB色彩变换到Lab空间代码
- RGB色彩变换到Lab空间代码
- android 图片操作之色彩变换
- 图像基本变换---图像伪色彩
- 变换色彩的旋转图形----背景效果
- GDI+学习及代码总结之-----坐标变换、矩阵变换及色彩变换
- GDI+学习及代码总结之-----坐标变换、矩阵变换及色彩变换
- caffe训练模型:(二)python+cv2 图像色彩变换
- 色彩
- 色彩
- 色彩
- 色彩
- aspx视图转换成Razor视图
- HDU 1003 Max Sum(最大字段和)
- Ultra-QuickSort
- 数据结构——图
- android 定时器的使用
- iOS UI01_色彩变换
- android 定时器的使用
- gethostbyname() -- 用域名或主机名获取IP地址
- android 定时器的使用
- [Android问答] px、dp和sp,这些单位有什么区别?
- Implement Queue using Stacks
- 2015年7月30日工作总结
- 成像系统总结
- android 定时器的使用