转载地址:http://www.apkbus.com/android-131646-1-1.html我们开发出来的运行在iOS平台上的应用程序都有一个UIApplication类的对象。1、是iOS应用程序的起始点,并负责初始化和显示UIWindow;2、负责加载应用程序的第一个UIView到UIW...
分类:
移动开发 时间:
2014-06-15 10:42:21
阅读次数:
266
之前介绍CCNode的时候说过,动作是指在特定时间内完成移动、缩放、旋转等操作的行为,节点可以通过运行动作来实现动画效果,这里的动作就是指CCAction对象,它有很多的子类,每个子类都封装了不同的动作效果。先来看看CCAction的继承结构图这里我省略了瞬时动作(CCActionInstant)和...
分类:
其他好文 时间:
2014-06-14 21:52:27
阅读次数:
411
动画是游戏的必定要素之中的一个,在整个游戏过程中,又有着加速、减速动画的需求。以塔防为样例,布塔的时候希望可以将游戏减速,布好塔后,则希望能将游戏加速;当某个怪被冰冻后,移动速度减缓,而其它怪的移动速度不变。cocos2d-x引擎为我们提供了非常强大的接口,以下就将我实验的过程复述一遍,也方便他人。...
分类:
其他好文 时间:
2014-06-14 21:28:53
阅读次数:
251
CATransition *animation = [CATransition animation];//初始化 [animation setDuration:0.5];//设置时间间隔 [animation setType: kCATransitionReveal]; [ani...
分类:
其他好文 时间:
2014-06-14 19:18:28
阅读次数:
185
import UIKitclass ViewController: UIViewController { var greenView:UIView! override func viewDidLoad() { super.viewDidLoad() // Do any ad...
分类:
移动开发 时间:
2014-06-14 18:10:54
阅读次数:
358
添加删除SUBVIEW1. 添加[self.view addSubview:customView]; 2. 删除一个view上面所有的subviewfor(UIView *subview in [self.view subviews]) { [subview removeFromSupervi...
分类:
其他好文 时间:
2014-06-14 15:45:53
阅读次数:
146
最近用code写了些view上的渐变效果,使得app的UI特效不必全部依赖美工出的图片。
效果如下:
主要用到了Layer上的渐变层,核心代码如下,关于CALaer的使用可参考
//Transparent Gradient Layer
- (void) insertTransparentGradient {
UIColor *colorOne = [UIColor color...
分类:
其他好文 时间:
2014-06-14 14:51:32
阅读次数:
275
广州小蛮腰1 广州小蛮腰2 广州小蛮腰3 广州小蛮腰4 广州小蛮腰5
分类:
其他好文 时间:
2014-06-14 09:46:55
阅读次数:
163
Mantle makes
it easy to write a simple model layer for your Cocoa or Cocoa Touch application. Mantle
can still be a convenient translation layer between the API and your managed model objects.
...
分类:
其他好文 时间:
2014-06-14 09:27:26
阅读次数:
463