摘要: iPhone Coding – Turbo Charging Your Apps With NSOperationMarch 4th, 2010Posted by:brandontreb- posted under:TutorialsIntroductionSo, let’s face it, MANY applications in the app store are “Clunky”. They have jittery interfaces, poor scrolling performance, and the UI tends to l 阅读全文
posted @ 2011-02-19 22:04 David@_@ 阅读(396) 评论(0) 推荐(0) 编辑
摘要: Core Animation: Creating a Jack-in-the-box with CAKeyframeAnimationA previous example demonstrated how CAKeyframeAnimation canmove layers along a CGPath, but CAKeyframeAnimation can also move a layer through a succession of points with a custom timing for each point. You might animate a pendulum wit 阅读全文
posted @ 2011-02-19 21:58 David@_@ 阅读(434) 评论(0) 推荐(0) 编辑
摘要: This will be a continuation ofMultiple Objects and UITouchIf you do a long touch in the main section of the iPhone on a icon you will notice the icons will wiggle. This shows the user they can be deleted or moved around. So lets try to mimic that as best we can and when we stop a drag of our image i 阅读全文
posted @ 2011-02-19 20:33 David@_@ 阅读(258) 评论(0) 推荐(0) 编辑
摘要: 关键帧,key frame,也就是说,一个完整的动画中要出现这些frame,然后按照次序播放,系统会补全这些frame之间的动画。最终形成一个完整的动画。这里要用到CAAnimation以及它的子类。因为CAAnimation是超类,抽象的,不能直接使用的。它有两个子类(间接子类,它们之间还有CAPropertyAnimation),可用于关键帧动画支持:CABasicAnimation:只能实现简单的动画,不支持复杂变化比如坐标,因为只有fromValue和toValue;CAKeyframeAnimation:可支持比较复杂的变化,因为可以将变化设置到Array中。下面在编写基于CALay 阅读全文
posted @ 2011-02-19 16:31 David@_@ 阅读(415) 评论(0) 推荐(0) 编辑
摘要: 做图形界面开发的感觉是,可以运用到一些数学知识了,哈哈。需求是将若干小图片平均分布在圆的周长上。效果如下:用右侧图来表示,就是要求x和y的坐标。iPad的坐标系从左上开始。圆参数方程公式:x=R*cos(A)y=R*sin(A)这个公式的坐标系是按照圆心来的,如果按照屏幕的坐标系,还需要加上偏移量。具体到本例中,任意多个图,比如n个,就相当于对2PI个弧度取n分之一。实现代码:- (void)viewDidLoad { [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation: UIStatusBarAnim 阅读全文
posted @ 2011-02-19 16:28 David@_@ 阅读(318) 评论(0) 推荐(0) 编辑