08 2016 档案

摘要:第一步,先在Attributes Inspector将Label的Lines设为0,Line Breaks设为Word Wrap,并将Label的位置,宽度和高度等都设置好,然后设置好自动布局,或者用第三方框架实现布局(例如SDAutoLayout)。 第二步,添加以下方法 - (void)setT 阅读全文
posted @ 2016-08-24 12:47 XuDeHong 阅读(376) 评论(0) 推荐(0)
摘要:注意: 1.四大直辖市的城市信息无法通过CLPlacemark的locality属性获得,只能通过访问administrativeArea属性来获得(如果locality为空,则可知为直辖市),代码参考如下 NSString *city = placemark.locality; if (!city 阅读全文
posted @ 2016-08-18 14:31 XuDeHong 阅读(10361) 评论(0) 推荐(1)
摘要:参考:http://www.jianshu.com/p/46f61bc7a938,https://github.com/Mringkang/KBCustomCenterTabbar 效果: PS:这里需要用到UIView一个分类的一些属性,参考http://www.cnblogs.com/guita 阅读全文
posted @ 2016-08-10 23:03 XuDeHong 阅读(21592) 评论(0) 推荐(1)
摘要:代码创建按钮UIButton: (一)基本设置 //创建中间“+”按钮 UIButton *addBtn = [[UIButton alloc] init]; //设置默认背景图片 [addBtn setBackgroundImage:[UIImage imageNamed:@"AddButtonI 阅读全文
posted @ 2016-08-10 22:45 XuDeHong 阅读(387) 评论(0) 推荐(0)
摘要:很有用的UIView分类,可以用来方便访问视图坐标X,Y,中心点,宽度和高度等等 UIView+Category.h UIView+Category.m 阅读全文
posted @ 2016-08-10 21:43 XuDeHong 阅读(2277) 评论(0) 推荐(0)
摘要:UIColor 转UIImage(可将该方法作为一个UIImage的分类) +(UIImage *)imageWithColor:(UIColor *)color andSize:(CGSize)size; { //描述一个矩形 CGRect rect = CGRectMake(0.0f, 0.0f 阅读全文
posted @ 2016-08-10 21:26 XuDeHong 阅读(681) 评论(0) 推荐(0)