Fork me on GitHub

04 2012 档案

摘要:NSNumberFormatter *formatter=[[NSNumberFormatter alloc]init]; [formatter setGroupingSeparator:@","]; [formatter setGroupingSize:3]; [formatter setUsesGroupingSeparator:YES]; NSNumber *num= [NSNumber numberWithInt:144343]; NSString *str = [formatter stringFromNumber:num]; 结果:144,343 阅读全文

posted @ 2012-04-25 15:37 pengyingh 阅读(828) 评论(0) 推荐(0)

摘要:#import <UIKit/UIKit.h>@interface DTGlowingLabel : UILabel{ UIColor *_outLineColor; UIColor *_insideColor; UIColor *b_lurColor;}@property (nonatomic, retain) UIColor *outLineColor;@property (nonatomic, retain) UIColor *insideColor;@property (nonatomic, retain) UIColor *blurColor;@end.m#impo... 阅读全文

posted @ 2012-04-17 13:45 pengyingh 阅读(2231) 评论(0) 推荐(0)

摘要:A.用CCFuncBlock可以不用传参数,代码简洁高效,函数内临时变量如果不retain,不存在跳出函数使用域后被回收情况(推荐)//用CCCallBlock的block方式CGPoint convertedLocation = [self convertTouchToNodeSpace:touch];CCCallBlock *block = [CCCallBlock actionWithBlock:^{ //回调方法在一个函数循环内3个好处: 1.不用传递(void *)参数,所以convertedLocation不需要封装, 2.... 阅读全文

posted @ 2012-04-10 09:53 pengyingh 阅读(7626) 评论(0) 推荐(1)

导航