1. 定义一个方法-(void) update{ }2. 对象注册,并关连消息[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(update) name:@"update" object:nil]3. 在...
分类:
其他好文 时间:
2014-07-07 17:45:21
阅读次数:
312
table类型实现了“关联数组”。“关联数组”是一种具有特殊索引方式的数组。不仅可以通过证书来索引它,还可以使用字符串或其他类型(除了nil)来索引它。table是Lua中主要的数据结构机制(事实也是仅有的),具有强大的功能。基于table可以以一种简单、统一和高效的方式来表示普通数组、符号表、集合...
分类:
其他好文 时间:
2014-07-03 11:36:07
阅读次数:
208
初始化UISegmentedControlNSArray *arr = [[NSArray alloc]initWithObjects:@"轻拍",@"长按",@"清扫",@"旋转",@"捏合",@"拖拽", nil];//先创建一个数组用于设置标题UISegmentedControl *segme...
分类:
其他好文 时间:
2014-06-30 13:27:13
阅读次数:
187
IOS中的动画有两大类1.UIView的视图动画2.Layer的动画 UIView的动画也是基于Layer的动画动画的代码格式都很固定1.UIView动画一般方式[UIView beginAnimations:@"ddd" context:nil];//设置动画[UIView commitAnima...
分类:
其他好文 时间:
2014-06-30 13:13:47
阅读次数:
184
APP开发学习//添加xib文件到窗口中NSArray *views = [[NSBundle mainBundle]loadNibNamed:@"View" owner:self options:nil];[self.window addSubview:[views lastObject]];//...
分类:
移动开发 时间:
2014-06-27 22:34:23
阅读次数:
320
+(UIImage *)getImage:(NSString *)videoURL{AVURLAsset *asset = [[AVURLAsset alloc] initWithURL:[NSURL fileURLWithPath:videoURL] options:nil];AVAssetIma...
分类:
移动开发 时间:
2014-06-27 13:15:09
阅读次数:
243
[formData appendPartWithFileURL:[NSURL fileURLWithPath:info.voice_networkPath] name:@"voice.amr" fileName:@"voice.amr" mimeType:@"" error:nil]; [fo...
分类:
其他好文 时间:
2014-06-26 21:07:10
阅读次数:
225
-- author : coder_zhang-- date : 2014-6-25root = nilfunction insert_node(number) if root == nil then root = {value = number, left = nil, ...
分类:
其他好文 时间:
2014-06-26 16:51:36
阅读次数:
170
// 安全释放
#define RELEASE_SAFELY(__Pointer) do{[__Pointer release],__Pointer = nil;} while(0)
// 屏幕的物理高度
#define ScreenHeight [UIScreen mainScreen].bounds.size.height
// 屏幕的物理宽度
#define ScreenWidth...
分类:
其他好文 时间:
2014-06-25 19:58:31
阅读次数:
197
iOS开发多线程篇—线程的状态一、简单介绍线程的创建:self.thread=[[NSThread alloc]initWithTarget:self selector:@selector(test) object:nil];说明:创建线程有多种方式,这里不做过多的介绍。线程的开启:[self.th...
分类:
移动开发 时间:
2014-06-25 11:55:02
阅读次数:
306