摘要: 参考: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 阅读(21396) 评论(0) 推荐(1) 编辑
摘要: 代码创建按钮UIButton: (一)基本设置 //创建中间“+”按钮 UIButton *addBtn = [[UIButton alloc] init]; //设置默认背景图片 [addBtn setBackgroundImage:[UIImage imageNamed:@"AddButtonI 阅读全文
posted @ 2016-08-10 22:45 XuDeHong 阅读(371) 评论(0) 推荐(0) 编辑
摘要: 很有用的UIView分类,可以用来方便访问视图坐标X,Y,中心点,宽度和高度等等 UIView+Category.h UIView+Category.m 阅读全文
posted @ 2016-08-10 21:43 XuDeHong 阅读(2245) 评论(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 阅读(645) 评论(0) 推荐(0) 编辑
摘要: Make a good first impression People who are searching or browsing the store for cool new apps generally look at things in this order: 1. The name of t 阅读全文
posted @ 2016-07-31 11:08 XuDeHong 阅读(146) 评论(0) 推荐(0) 编辑
摘要: (一)针对XIB(NIB)文件里某个控件的固定文本进行国际化 1.添加要国际化的语言,按照类似下图进行设置(其中Base一般为English): 2.选中要进行国际化的XIB(NIB)文件,打开File inspector,选中Localize...,弹出对话框,先默认选中Base: 3.勾选刚刚添 阅读全文
posted @ 2016-07-28 22:55 XuDeHong 阅读(337) 评论(0) 推荐(0) 编辑
摘要: 适用场景:当应用要创建多个版本时;或对当前版本代码需要大幅度修改时,为避免出错无法恢复,创建另一个分支来修改,则不影响原来版本(分支,默认为master) 1.创建分支 (1)在Xcode菜单栏Source Control选项下,如下图进行选择: (2)创建分支,如下图,点击左下角的“+”,在弹出的 阅读全文
posted @ 2016-07-28 21:44 XuDeHong 阅读(162) 评论(0) 推荐(0) 编辑
摘要: (一)对于某个ViewController 首先,需要在Info.plist配置文件中,增加键:View controller-based status bar appearance,并设置为YES; 然后,在UIViewController子类中实现以下两个方法: - (UIStatusBarSt 阅读全文
posted @ 2016-07-25 11:19 XuDeHong 阅读(465) 评论(0) 推荐(0) 编辑
摘要: 1.常量名称最好用static标识,例如下面的代码,包括其他一些只需要定义一次,之后不需要变化的变量也最好使用static static NSString *CellIdentifier = @"Cell"; 2.当设置视图控制器需要接受通知时,需要在dealloc取消监听 例如下面代码监听通知: 阅读全文
posted @ 2016-07-20 22:03 XuDeHong 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 今天遇到了一个问题,通过这句代码NSString *path = [[NSBundle mainBundle] pathForResource:@"Sound.caf" ofType:nil]; 返回的path为空,而我已经把Sound.caf文件添加到项目中,最后在项目设置的Build Phase 阅读全文
posted @ 2016-07-18 22:57 XuDeHong 阅读(596) 评论(0) 推荐(0) 编辑