05 2013 档案

摘要:1.下载文件 (http://code.google.com/p/protobuf/ )并解压到本地文件夹。2.确认安装过GCC(可以在终端下输入gcc - -version 测试).如果电脑上没有安装过GCC的话,你在下面步骤中会看到提示"$PATH路径中没有C编译器"(原话不记得怎么写的了,就是这个意思)。通常做开 发的MAC上都装过Xcode,很多人都说装过Xcode默认都有GCC,但我发现并不是这样,可以这样再单独安装:Xcode->Preferences->Downloads下的Components下,选择安装Command Line Tools。3. 阅读全文
posted @ 2013-05-28 16:11 翛尧 阅读(688) 评论(0) 推荐(0)
摘要:Memory ManagementAll memory in a computer program must be allocated before it can be used and if you want to reuse that memory later for another purpose, it must be deallocated when you are done with it.In garbage collected environments, programmers don't need to handle the allocation and deallo 阅读全文
posted @ 2013-05-24 17:36 翛尧 阅读(256) 评论(0) 推荐(0)
摘要:概述UIView对象在屏幕中定义了一个复杂区域和界面来管理这个区域的内容视图的职责:画图和动画。布局和子视图管理。事件处理。1、创建一个视图对象CGRect viewRect = CGRectMake(10,10,100,100);UIView* myView = [[UIView alloc] initWithFrame:viewRect];[self.window addSubview :myView];//将视图作为子视图添加到window中2、动画改变一些视图属性将会使用到动画,改变属性时创建一个动画,用于给用户传递在较短时间内的变化。UIView类做了动画展现的大部分工作,但是你仍然 阅读全文
posted @ 2013-05-16 15:52 翛尧 阅读(188) 评论(0) 推荐(0)
摘要:#ifdef DEBUG #define MALog(...) NSLog(__VA_ARGS__); #define MALog_Func(x) NSLog(@"%s: L%d :%@", __func__, __LINE__, (x)); #define MALogStack NSLog(@"%s: L%d :%@", __func__, __LINE__, [NSThread callStackSymbols]);#else #define MALOG(...); #define MALog_Func(x); #define MALogStack; 阅读全文
posted @ 2013-05-14 14:07 翛尧 阅读(154) 评论(0) 推荐(0)