博客园  :: 首页  :: 新随笔  :: 订阅 订阅  :: 管理

03 2013 档案

摘要:Grand Central Dispatch (GCD)是Apple开发的一个多核编程的解决方法。dispatch queue分成以下三种:1)运行在主线程的Main queue,通过dispatch_get_main_queue获取。/*!* @function dispatch_get_main_queue** @abstract* Returns the default queue that is bound to the main thread.** @discussion* In order to invoke blocks submitted to the main queue, 阅读全文

posted @ 2013-03-31 00:47 扬名 阅读(147718) 评论(15) 推荐(16)

摘要:一种网上流传的递归型全排列算法,原创不详。只不知如果数组中有重复的元素的话何解?#include <iostream>void permutation(char* list, int begin, int end) { if(begin < end) { for(int i = begin; i <= end; ++i) { std::swap(list[i], list[begin]); permutation(list, begin + 1, end); std::swap(list[i], list[b... 阅读全文

posted @ 2013-03-24 14:21 扬名 阅读(1309) 评论(0) 推荐(0)

摘要:手势识别类型:UILongPressGestureRecognizer // 长按UIPanGestureRecognizer // 慢速拖动UIPinchGestureRecognizer // 两指向內或向外拨动UIRotationGestureRecognizer // 旋转UISwipeGestureRecognizer // 快速滑动UITapGestureRecognizer // 点击手势协议:@protocol UIGestureRecognizerDelegate <NSObject>@optional// called when a ges... 阅读全文

posted @ 2013-03-23 20:54 扬名 阅读(1746) 评论(1) 推荐(0)

摘要:以前项目中曾经用到过,后来因为GIF图像的质量较差,被弃用了,把公司名字去掉分享下,根据网上资料改编的cocos2d-iphone版的。//// CCSpriteGif.h//// Created by Yuming on 13-1-23.// Copyright 2013年 __MyCompanyName__. All rights reserved.//// 本类需要导入ImageIO.framework#import <Foundation/Foundation.h>#import "cocos2d.h"#import <ImageIO/ImageI 阅读全文

posted @ 2013-03-23 20:54 扬名 阅读(5237) 评论(0) 推荐(0)

摘要:官方文档:Quartz 2D Programming Guide译文:Quartz 2D编程指南(1) - 概览Quartz 2D编程指南(2) - 图形上下文(Graphics Contexts)Quartz 2D编程指南(3) - 路径(Paths)【上】Quartz 2D编程指南(3) - 路径(Paths)【下】Quartz 2D编程指南(4) - 颜色和颜色空间Quartz 2D编程指南(5) - 变换Quartz 2D编程指南(7) - 阴影Quartz 2D编程指南(9) -- 透明层Quartz 2D编程指南(10) -- Quartz 2D中的数据管理Quartz 2D编程指 阅读全文

posted @ 2013-03-11 20:13 扬名 阅读(1160) 评论(0) 推荐(0)

摘要:引用自:Tutorial: Detecting When A User Blows Into The MicIf, a couple of years back, you’d told me that people would expect to be able to shake their phone or blow into the mic to make something happen I would have laughed. And here we are.Detecting a shake gesture is straightforward, all the more so i 阅读全文

posted @ 2013-03-10 21:01 扬名 阅读(2924) 评论(0) 推荐(0)