CALayer总结
摘要:每个uiview都有一个层,每个层可以有多个子层。1)layer的设计目的不是取代视图,不能基于layer创建一个可视化的控件2)layer设计目的是提供视图的基本可视内容。提高动画的执行效率。主要是提高动画的执行效率。3)除了提供可视内容。layer不负责事件响应,内容填充,layer不参与到响应者链条中。改变视图的layer的属性,会包含一些隐式动画。常用的属性有,圆角半径,阴影,边框它是动画的核心。核心动画的本质是,将CALayer中的内容转换成位图,然后由图形硬件来操作。每个uiview内部都有个layer.layer的视图功能非常强大。CALayer并不是属于uikit框架,在Qua
阅读全文
UIView的转场动画- 单视图和双视图
摘要:单视图转场动画- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ [UIView transitionWithView:self.imageview duration:1.0f options:UIViewAnimationOptionTransitionFlipFromLeft animations:^{ // 这里只要设置视图翻转之后的内容就行。 self.imageview.tag = (self.imageview.tag + 1)%self.imagelist.count; ...
阅读全文
转场动画
摘要:从一个场景转到另一个场景。多视图控制器的model,push这些都是转场动画。共同的特点是,在转场过程中不能交互。CATransitiontype:动画类型subtype:动画过渡方向动画之间的关联关系转场动画支持方向type和subtype都是字符串。type有关键字设置type和subtype,有些有关键字常量,但可以直接使用字符串。- (void)myswipe:(UISwipeGestureRecognizer *)gesture{ CATransition *transiton = [[CATransition alloc] init]; UIImageView *imagevi..
阅读全文
关键帧动画-动画组
摘要:- (void)tapAction:(UITapGestureRecognizer *)recognizer{ // 取出手势的触摸点 CGPoint location = [recognizer locationInView:self.view]; // 1. 实例化动画组 CAAnimationGroup *group = [[CAAnimationGroupalloc]init]; CFTimeInterval duration = 2.0; // 2. 定义动画组中的动画// CAKeyframeAnimation *anim1 = [AnimationView mo...
阅读全文
关键帧动画
摘要:关键帧动画和基本动画一样。创建步骤都是1 实例化动画对象2 设置属性3 添加到图层。如果使用了路径,values属性就被忽略。对于位移动画,需要在动画结束时候,设置视图位置。在创建动画的时候需要设置代理。然后在动画结束代理程序里设置位置。//// AnimationView.m// 关键帧动画_demo1//// Created by mac on 13-9-30.// Copyright (c) 2013年 mac. All rights reserved.//#import "AnimationView.h"#import @implementation Animati
阅读全文
posted @
2013-09-30 18:19
老猫zl
阅读(285)
推荐(0)
动画的暂停和恢复
摘要:基本动画创建的步骤1 根据keypath创建动画对象2 设置基本属性3 添加到视图的图层//// MainViewController.m// animation_demo3//// Created by mac on 13-9-30.// Copyright (c) 2013年 mac. All rights reserved.//#import "MainViewController.h"@interfaceMainViewController ()@property (nonatomic,weak) UIView *myview;@end@implementation
阅读全文
APP被苹果App Store拒绝的79个原因(未完待续)
摘要:作为iOS开发者,估计有很多都遇到过APP提交到App Store被拒,然后这些被拒的原因多种多样,今天dApps收集了常见的被拒的原因,以便更多开发者了解。APP被苹果APPStore拒绝的各种原因1、程序有重大bug,程序不能启动,或者中途退出。2、绕过苹果的付费渠道,我们之前游戏里的用兑换码兑换金币。3、游戏里有实物奖励的话,一定要说清楚,奖励由本公司负责,和苹果没有关系。4、用到苹果的标志。(应用的设计和Apple的Logo风格太像了也会被拒)5、网络功能不能正常访问。6、图标不能点击,不能点击的图标要置灰,或者直接隐藏。7、没有设置default页,启动画面为黑屏,有一定概率被拒绝。
阅读全文
posted @
2013-09-30 14:01
老猫zl
阅读(179)
推荐(0)
核心动画coreanimation总结(转)
摘要:CABasicAnimation animationWithKeyPath TypesWhen using the ‘CABasicAnimation’ from the QuartzCore Framework in Objective-C, you have to specify an animationWithKeyPath.This is a long string and is not easily listed in the CABasicAnimation, CAPropertyAnimation, or the CAAnimation class.I ended up find
阅读全文
IOS几个常用功能
摘要:通过tag获取控件MyButton *btn = (MyButton *)[self.contentView viewWithTag:tag];通过segue跳转页面[selfperformSegueWithIdentifier:@"playGame"sender:sender];取消模式窗口[selfdismissViewControllerAnimated:YEScompletion:nil];呈现模式窗口[selfpresentViewController:imagePicker animated:YEScompletion:nil];设置imageview里图片按照
阅读全文
4种方式创建视图控制器
摘要:创建一个视图,先在文件检查器里去掉自动布局选项。然后调整视图尺寸到3.5UIView的作用是布局,渲染,分发事件。常用到的视图控制器是UIViewControllerUINavigationControllerUITabBarControllerUITableViewController//// AppDelegate.m// WX_01_controller//// Created by mac on 13-8-23.// Copyright (c) 2013年 mac. All rights reserved.//#import "AppDelegate.h"#impo
阅读全文
posted @
2013-08-23 13:38
老猫zl
阅读(492)
推荐(0)