随笔分类 -  iOS Tour

CAMediaTimingFunction相关
摘要:一:Animation Timing Curves1:Linear Animation Timing2:Ease-In Animation Timing3:Ease-Out Animation Timing4:Ease-In Ease-Out Animation Timing5:Custom Animation Timing自定义动画执行曲线设置We create a custom timing with the initWithControlPoints:::: method on CAMediaTimingFunction like this:C代码 - (CAMediaTimingFun 阅读全文

posted @ 2013-05-10 12:00 wacao 阅读(1002) 评论(0) 推荐(0)

CALayer和UIView
摘要:At a GlanceUIView是在/System/Library/Frameworks/UIKit.framework定义,也就是处于Cocoa Touch层。CALyer是在/System/Library/Frameworks/QuartzCore.framework定义,也就是处于Media层。从iOS整个体系分层结构看,CALayer较UIView更底层。Layer相关描述:Core Animation本身不是绘画系统(drawing system),它是硬件中合成和操控app内容的基础(infrastructure)。这个基础的核心是layer对象,layer是用于管理和操控内容的 阅读全文

posted @ 2013-04-09 18:36 wacao 阅读(747) 评论(0) 推荐(2)

Memory Management in Cocoa Program
摘要:内存管理模型基于对象的引用计数。一个对象至少有一个拥有者。如果一个对象没有拥有者,运行时系统会自动destroy它。为了保证正确清除掉拥有的调用,Cocoa设定了以下的基本准则。基本准则:创建一个对象,你就持有了它。(创建一个对象的方法往往是已“alloc”,“new”,“copy”或者“mutableCopy”为前序)可以通过retain去持有一个对象当不再需要对象时,就要清除掉持有对象的引用(通过发送release或者autorelease消息)不持有的对象不需要清除掉引用(例如[NSString stringWithFormat:""]的对象就是你没有持有的对象,不需 阅读全文

posted @ 2013-03-05 20:17 wacao 阅读(343) 评论(0) 推荐(0)

认识View Controller
摘要:重复一万遍:基础很重要。。。。。内容基本来自官方文档,确保可信。@interface UIViewController : UIResponder <NSCoding, UIAppearanceContainer> {}@end继承(Inherits from)UIResponder。遵守(conform to)协议(protocol)NSCoding,UIAppearanceContainer和根对象NSObject。属于UIkit.framework,iOS2.0及之后的版本支持该类。作用概述(后面还会详细介绍View Controller的责任):ViewController 阅读全文

posted @ 2013-03-04 17:48 wacao 阅读(2652) 评论(0) 推荐(0)

iOS分类和扩展(Categories和Extensions)
摘要:分类(Category)分类能够做到的事情主要是:即使在你不知道一个类的源码情况下,向这个类添加扩展的方法。此外,分类能够保证你的实现类和其他的文件区分开。View Code 1 #import “UIViewController.h”2 @interface UIViewController(CustomView)3 -(void)extMethod;4 @end使用分类为类添加方法(Add Methods to Classes)通过在interface中声明一个额外的方法并且在implementation 中定义相同名字的方法即可。分类的名字(也就是括号括起来的CustomView)表示的 阅读全文

posted @ 2013-02-21 15:57 wacao 阅读(7662) 评论(3) 推荐(2)

Property Declaration Attributes
摘要:题目不知道应该怎么翻译?硬是要翻译,只能是属性声明的特性。对于这部分内容,《The Object C 2.0 Programming Language》的介绍是:You can decorate a property with attributes by using the form @property(attribute[,attribute2,...]). Like methods,properties are scoped to their enclosing interface declaration.For propertydeclarations that use a comma 阅读全文

posted @ 2013-02-21 15:53 wacao 阅读(254) 评论(0) 推荐(0)

iOS Apps核心对象
摘要:UIApplication:处理来自系统的事件并将这些事件分发到开发者的自定义代码去处理。作为一个controller对象 ,它处理app的事件循环和协调其他上层的app行为。开发者自定义的app层逻辑位于app的delegate对象,与UIApplication联合一起工作。App Delegate Object:app delegate对象是一个自定义对象,在app启动的时候创建,通常在UIApplicationMain方法中创建。它最基本的工作就是负责app中的事件传递。Documents和data model Objects:Data model object存储app的内容,它根据. 阅读全文

posted @ 2013-02-18 11:55 wacao 阅读(283) 评论(0) 推荐(0)

iOS 系统框架分层结构
摘要:简要介绍iOS各层的作用和包含的东西。Cocoa Touch Layer包含创建一个ios应用的关键框架(framework)。定义支撑起一个app的基础内容和核心技术,例如多线程、基于touch的输入、手势、标准的系统view contoller、push通知和一些高层次的系统服务。(因为名字的原因,初级开发者很容易被误导认为Cocoa Touch只是涉及到UI上的一些touch操作之类的东西)涉及的高级特性有:涉及的框架有:Media Layer包含提供多媒体体验的绘图和音视频技术。(Graphics technologies、Audio technologies and Video te 阅读全文

posted @ 2013-02-06 18:20 wacao 阅读(1743) 评论(0) 推荐(1)

导航