06 2013 档案

摘要:刚开始学的时候没有真正理解,现在突然想写点东西了以前写代码都是依葫芦画瓢,别人写什么样子自己就照着写,比如说@interface Counter : A{ NSString *a;}@property (nonatomic, retain) Nsstring*a;@end然后不管程序中用没用到 我都会在-(void)delloc{ [a release]; [super delloc];}其实现在看来是有问题的,因为在写property (nonatomic, retain)NSArry*a后系统没默认帮做上这个操作-(void)setObjA:(NSString*)aa{ If(a!=... 阅读全文
posted @ 2013-06-23 15:48 小乐" 阅读(265) 评论(0) 推荐(0)
摘要:转自http://blog.csdn.net/cockroach/article/details/9047413IOS上的多线程应用程序开发需要使用到Block,Block就是类似于C++中的函数指针的概念。Block的主要用途在于多线程操作的情况。正常情况下流程如下:创建一个queue;dispatch_queue_create添加block到queue;dispatch_async我们的界面中有两个button,两个label,事件处理代码如下:[cpp]view plaincopy-(IBAction)generateNumber:(id)sender{NSString*str=[[NS 阅读全文
posted @ 2013-06-23 14:55 小乐" 阅读(387) 评论(0) 推荐(0)
摘要:创建一个 Timer+scheduledTimerWithTimeInterval: invocation: repeats:+ (NSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)ti invocation:(NSInvocation *)invocation repeats:(BOOL)yesOrNo;+scheduledTimerWithTimeInterval: target: selector: userInfo: repeats:+ (NSTimer *)scheduledTimerWithTimeInterval.. 阅读全文
posted @ 2013-06-20 10:51 小乐" 阅读(287) 评论(0) 推荐(0)
摘要:项目中要用到二维码我用的ZBarSDK 使用的时候抛libzbar.a for architecture armv7s 不支持armv7s。然后立马求救谷哥和度娘,发现解决办法千篇一律都是去掉armv7s或者Build Active Architecture Only设置成yes 这完全没有根本解决问题,当项目要发布的时候怎么办呢。然后硬着头皮去翻老外的帖子找到了解决办法。请跳转到http://www.federicocappelli.net/2012/10/05/zbar-library-for-iphone-5-armv7s/。问题已解决 不管你信不信 反正我信了。(不禁感慨老外真给力.. 阅读全文
posted @ 2013-06-19 12:55 小乐" 阅读(533) 评论(0) 推荐(0)