摘要:
boolean 是int型Boolean 是char型BOOL 是unsigned char型,BOOL b 当b=1 b=YESbool是int型,bool b 当b>1 b=YES 阅读全文
posted @ 2013-02-04 12:37 碧海蓝天_lz 阅读(328) 评论(0) 推荐(0)
|
摘要:
boolean 是int型Boolean 是char型BOOL 是unsigned char型,BOOL b 当b=1 b=YESbool是int型,bool b 当b>1 b=YES 阅读全文
posted @ 2013-02-04 12:37 碧海蓝天_lz 阅读(328) 评论(0) 推荐(0)
摘要:
源代码:http://code.google.com/p/ziparchive/压缩文件 BOOL ret = [zip CreateZipFile2:l_zipfile]; // 或者 BOOL ret = [zip CreateZipFile2:l_zipfile Password:@"your password"]; //支持密码 如果密码是空的和上一个效果一样 ret = [zip addFileToZip:l_photo newname:@"photo.jpg"];//添加文件到压缩包中 ... 阅读全文
posted @ 2012-11-20 16:34 碧海蓝天_lz 阅读(154) 评论(0) 推荐(0)
摘要:
iOS中我们可以通过NSURLRequest和NSURLConnection来建立一些HTTP请求下载数据等等先看一个例子:NSURLRequest *theRequest=[NSURLRequest requestWithURL: [NSURL URLWithString:@“http://www.baidu.com/”] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0]; NS... 阅读全文
posted @ 2012-11-20 11:23 碧海蓝天_lz 阅读(777) 评论(0) 推荐(0)
摘要:
NSOperation和NSOperationQueue是处理多线程操作的一种简单解决办法。NSOperation可以理解为单一的任务,NSOperationQueue是包含很多NSOperation任务的队列,在广义上并发的执行。NSOperation有一个简化版NSInvocationOperation,使用NSInvocationOperation我们无需继承NSOperation来制定我们的任务。例如:NSInvocationOperation *invocOperation = [[NSInvocationOperation alloc] initWithTarget:self .. 阅读全文
posted @ 2012-11-20 10:43 碧海蓝天_lz 阅读(190) 评论(0) 推荐(0)
摘要:
获取程序 docment目录NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);NSString *documentsDirectory = [paths objectAtIndex:0];NSLog(@"===================%@",documentsDirectory); 返回程序目录NSString *pathss = NSHomeDirectory(); NSLog(@"=============== 阅读全文
posted @ 2012-11-16 14:44 碧海蓝天_lz 阅读(100) 评论(0) 推荐(0)
摘要:
bundle是一个目录,其中包含了程序会使用到的资源. 这些资源包含了如图像,声音,编译好的代码,nib文件。 我们的程序是一个bundle. 在Finder中,一个应用程序看上去和其他文件没有什么区别. 但是实际上它是一个包含了nib文件,编译代码,以及其他资源的目录. 我们把这个目录叫做程序的main bundle。 通过使用下面的方法得到程序的main bundleNSBundle *myBundle = [NSBundle mainBundle]; 获取plistNSDictionary *dict = [NSDictionary dictionaryWithContents... 阅读全文
posted @ 2012-11-16 14:12 碧海蓝天_lz 阅读(117) 评论(0) 推荐(0)
摘要:
1,从网上下载lua的源码,下载地址:http://www.lua.org/ftp/2,由于mac系统本身不带有make和gcc,所以需要安装make和gcc,mac安装command_line_tools 即可, Apple官网有下,这里给出115地址:http://115.com/file/behz92r83,安装command_line_tools 后用终端进入源码所在目录, 执行: make macosx make test 显示版本信息即可。4, 添加环境变量到mac,编辑/ect/paths 添加生成的lua luac的路径到paths即可待续...... 阅读全文
posted @ 2012-07-25 23:11 碧海蓝天_lz 阅读(259) 评论(0) 推荐(0) |
||