摘要: 方法1.go to the Product menu and find the Edit Scheme menu there.While in Edit Scheme window, select the "Run" option on the left hand side of the scree... 阅读全文
posted @ 2014-06-11 11:20 高笑228 阅读(3165) 评论(0) 推荐(0) 编辑
摘要: Virtual是C++ OO机制中很重要的一个关键字。只要是学过C++的人都知道在类Base中加了Virtual关键字的函数就是虚拟函数(例如下面例子中的函数print),于是在Base的派生类Derived中就可以通过重写虚拟函数来实现对基类虚拟函数的覆盖。当基类Base的指针point指向派生类Derived的对象时,对point的print函数的调用实际上是调用了Derived的print函数而不是Base的print函数。这是面向对象中的多态性的体现。(关于虚拟机制是如何实现的,参见Inside the C++ Object Model ,Addison Wesley 1996)[cp 阅读全文
posted @ 2014-03-13 21:15 高笑228 阅读(322) 评论(0) 推荐(0) 编辑
摘要: Xcode 5中苹果对多个系统框架及相关类库进行了改进。之前建立的项目在Xcode 5中重新编译会产生一些新问题。JosnKit是常用的轻量级Josn解析类,在Xcode 5中: BOOLworkAroundMacOSXABIBreakingBug = (JK_EXPECT_F(((NSUInteger)object) &0x1)) ?YES:NO;一行会提示如下警告:warning: bitmasking for introspection of Objective-C object pointers is strongly discouraged虽然不影响使用,但有完美编译强迫症的 阅读全文
posted @ 2013-11-22 11:15 高笑228 阅读(961) 评论(0) 推荐(0) 编辑
摘要: (1).'libxml/tree.h' file not found解决办法:1. 导入libxml2.dylib2.设置Header Search Paths 为 /usr/include/libxml2 阅读全文
posted @ 2013-11-22 11:14 高笑228 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 示例1:基本赋值取值@interface Book : NSObject { NString *name;}@end#import "Book.h"@implementation Book@end这个Book类太简单了,只有一个实例变量name。而且,按照以前掌握的技术,没有办法给这个变量赋值了。下面KVC登场:Book *book=[[Book alloc] init];[book setValue:@"《Objective-C入门》" forKey:@"name"];NSString *name=[book valueForKey 阅读全文
posted @ 2013-09-04 15:32 高笑228 阅读(343) 评论(0) 推荐(0) 编辑
摘要: 现象:在xcode中调试程序的时候,无论是鼠标指在变量上,还是在gdb中po命令都看不到内存中变量的值。解决办法:在Project的Build中把 Optimization Level 设置成 None 即可。转自http://blog.csdn.net/ajrm0925/article/details/8646956 阅读全文
posted @ 2013-09-04 15:21 高笑228 阅读(493) 评论(0) 推荐(0) 编辑
摘要: Objective-C很有趣的一个地方是,它非常非常像C。实际上,它就是C语言加上一些其他扩展和一个运行时间(runtime)。有了这个在每个Objective-C程序中都会起作用的附加运行时间,给了它一些动态的特性。C和C++没有运行时间,他们仅仅被编译为完全按照代码的顺序去执行,不多也不少。Objective-C中带有运行时间的好处是,它可以在你的程序运行的流程中进行参与。在Objective-C中,它包括检查是否一个对象可以处理特定的消息,如果不能处理,它就帮助你自动调用其他特定的方法去完成。initialize不是init运行时间的行为之一就是initialize。虽然看起来有点像大家 阅读全文
posted @ 2013-09-04 15:19 高笑228 阅读(281) 评论(0) 推荐(0) 编辑
摘要: -(UIImage*) convertToGreyscale:(UIImage*)i {int kRed =1;int kGreen =2;int kBlue =4;int colors = kGreen;int m_width = i.size.width;int m_height = i.size.height;uint32_t*rgbImage =(uint32_t*) malloc(m_width * m_height *sizeof(uint32_t));CGColorSpaceRef colorSpace =CGColorSpaceCreateDeviceRGB();CGConte 阅读全文
posted @ 2013-09-03 11:51 高笑228 阅读(373) 评论(0) 推荐(0) 编辑
摘要: http://iiiyu.com/2012/07/07/learning-ios-notes-eight/ 阅读全文
posted @ 2013-07-16 17:14 高笑228 阅读(558) 评论(0) 推荐(0) 编辑
摘要: http://www.dreamingwish.com/dream-2013/block介绍(一)基础.html 阅读全文
posted @ 2013-07-16 14:38 高笑228 阅读(187) 评论(0) 推荐(0) 编辑