摘要: 在iOS开发中,我们经常会遇到View设置圆角的问题,如果需要将UIView的4个角全部都为圆角,做法相当简单,只需设置其Layer的cornerRadius属性即可(项目需要使用QuartzCore框架)。而若要指定某几个角(小于4)为圆角而别的不变时,这种方法就不好用了。如图:对于后者这种情况,... 阅读全文
posted @ 2016-01-07 12:41 CodingMann 阅读(1533) 评论(0) 推荐(0) 编辑
摘要: 最近遇到了一个关于JSONKit的问题,在项目加了arm7 64位以后,JSONKIT会出现[params JSONString] forKey:@”gson”];报错的情况,如下图具体原因不太清楚,这是iOS9出现的新问题,好像是字典变字符串时出问题了。下面直接附上解决办法:找到JSONKit.h... 阅读全文
posted @ 2016-01-07 12:40 CodingMann 阅读(376) 评论(0) 推荐(0) 编辑
摘要: 转载自:http://jinqianchina.github.io/2015/08/16/UICollectionview%E7%9A%84%E4%BD%BF%E7%94%A8%E8%AF%A6%E8%A7%A3/UICollectionview的使用详解三个代理前两个的用法和tableView的很... 阅读全文
posted @ 2016-01-07 11:52 CodingMann 阅读(403) 评论(0) 推荐(0) 编辑
摘要: 1.函数无限递归爆栈(表视图返回Cell和返回行高的方法互相调用)2.某对象无法解析某个方法(没做类型转换、或者代理没实现某个方法)3.访问了某个已经被释放的对象(ARC之后不太有)4.从Bundle加载了不存在或者不支持的对象(图片素材之类的)5.子线程阻塞主UI线程过久 阅读全文
posted @ 2016-01-06 16:23 CodingMann 阅读(438) 评论(0) 推荐(0) 编辑
摘要: // 设置tabbar的角标[[[[[self tabBarController] viewControllers] objectAtIndex: 0] tabBarItem] setBadgeValue:[NSString stringWithFormat:@"%ld",(long)number]... 阅读全文
posted @ 2015-12-22 14:19 CodingMann 阅读(248) 评论(0) 推荐(0) 编辑
摘要: 计算日期间隔方式比较常见的方式如下:NSCalendar*gregorian=[[NSCalendaralloc]initWithCalendarIdentifier:NSGregorianCalendar];[gregoriansetFirstWeekday:2];NSDateFormatter*... 阅读全文
posted @ 2015-12-17 13:25 CodingMann 阅读(755) 评论(0) 推荐(0) 编辑
摘要: ios7中,UITableViewCell左侧会有默认15像素的空白。设置setSeparatorInset:UIEdgeInsetsZero 能将空白去掉。ios8中,setSeparatorInset:UIEdgeInsetsZero 的设置已经不起作用了。工程中添加如下代码便可解决:self.... 阅读全文
posted @ 2015-12-15 15:03 CodingMann 阅读(890) 评论(0) 推荐(0) 编辑
摘要: 转载自:http://blog.csdn.net/xunyn/article/details/8128031 动画效果是IOS界面重要的特色之一,其中CAAnimation是所有动画对象的抽象父类,作为新人,使用较多的是UIView下的动画方法(类方法)。使用UIView下的动画,有下面几个方法。 阅读全文
posted @ 2015-11-27 16:17 CodingMann 阅读(349) 评论(0) 推荐(0) 编辑
摘要: CGContextRefcontext =UIGraphicsGetCurrentContext();//设置上下文//画一条线CGContextSetStrokeColorWithColor(context, [UIColorredColor].CGColor);//线条颜色CGContextSe... 阅读全文
posted @ 2015-11-27 15:33 CodingMann 阅读(230) 评论(0) 推荐(0) 编辑
摘要: http://www.molotang.com/articles/1234.html 阅读全文
posted @ 2015-11-26 12:12 CodingMann 阅读(208) 评论(0) 推荐(0) 编辑