02 2014 档案

摘要:手动添加一断点:add symbolic breakpoint命名为:objc_exception_throw如上图所示!这样,每次调用类似 [object noSuchMethod]引发的crash时,都可直接定位到具体出错的代码行上。 阅读全文
posted @ 2014-02-24 13:38 leevaboo 阅读(172) 评论(0) 推荐(0)
摘要:关于IOS行业编程的统一规范,我们在提升编码自身简洁和性能方便要注意,也是一个优秀的程序员必备的素质,鉴于之前交接的项目,希望我们外包的程序在这方便按着规范的要求。1、 首先是内存管理,有new 、alloc的对象如果不是ARC管理的必须有释放,dealloc写在@implementation下面,init放到其下面,方便查阅,需要autorelease的也要写上,比如tableView创建cell的时候,发现i摩比移动端有忘记写autorealse的现象。2、 通知中心注册需要在dealloc中对应remove掉对象,一个对象的delegate对象要在dealloc... 阅读全文
posted @ 2014-02-23 22:31 leevaboo 阅读(251) 评论(0) 推荐(0)
摘要:大家好,这么晚了,因为我昨天再接过的项目是,发现外包的伙伴们写的Tabbar是系统的,因为我们的产品要求的是44的高度,而系统的Tabbar的高度是49像素,所以怎么办呢,外包的伙伴们做的是在系统的Tabbar的Item上做的视图覆盖,这样我发现有白色的5像素视图会在iPhone5一下的设备并且是IOS7一下的系统上出现,那么怎么办呢,当然做好的办法是不是补补改改,最好的就是从跟上解决,这样我们框架上的其他东西就不会导致一些问题的出现,所以就要自定义Tabbar,系统给了一个好的方法:切换视图控制器的:- (void)transitionFromViewController:(UIVi... 阅读全文
posted @ 2014-02-19 23:35 leevaboo 阅读(1107) 评论(0) 推荐(0)
摘要:一、APNS1.注册[cpp]view plaincopyprint?[[UIApplicationsharedApplication]registerForRemoteNotificationTypes:UIRemoteNotificationTypeBadge|UIRemoteNotificationTypeSound|UIRemoteNotificationTypeAlert];2.服务器推送(JAVA)[java]view plaincopyprint?PushNotificationPayloadpayLoad=PushNotificationPayload.fromJSON(mes 阅读全文
posted @ 2014-02-14 14:11 leevaboo 阅读(578) 评论(0) 推荐(0)
摘要:CGContextRef context = UIGraphicsGetCurrentContext();//获取绘画上下文 UIColor *color = [UIColorcolorWithRed:0.8green:0.2blue:0.3alpha:0.9]; CGColorRef aCGColor = color.CGColor;//设置绘画颜色 CGContextSetFillColor(context, CGColorGetComponents(aCGColor));//绘画的填充颜色 CGContextSetFlatness(context, 1);//设置绘画平整... 阅读全文
posted @ 2014-02-14 14:10 leevaboo 阅读(447) 评论(0) 推荐(0)
摘要:NSStringFromSelectorNSStringFromClassNSStringFromProtocolNSSelectorFromStringNSClassFromStringNSProtocolFromString、、、、、、、、、、、、、、、、、、、、、、、、FOUNDATION_EXPORT NSString *NSStringFromSelector(SEL aSelector);FOUNDATION_EXPORT SEL NSSelectorFromString(NSString *aSelectorName);FOUNDATION_EXPORT NSString *NS 阅读全文
posted @ 2014-02-11 17:37 leevaboo 阅读(286) 评论(0) 推荐(0)
摘要:@interface UIFullTouchImageView : UIImageView@end@implementation UIFullTouchImageView- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event{ returnYES;}- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ UITouch *touch = [touches anyObject]; CGPoint p = [touch locationInView:... 阅读全文
posted @ 2014-02-10 17:34 leevaboo 阅读(153) 评论(0) 推荐(0)