摘要: 发现打上钩的话在plus以下的屏幕上控件的实际x会是-4但是在plus上是0,所以要设置一致的到视图的左右都未0 必须把Constrain to margins钩去掉! 阅读全文
posted @ 2016-01-25 19:53 菜鸟工程司 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 在SB中控件可以在SB中直接利用kvc 设置一些属性值,不如layerwidth等 但是不能更改和颜色有关的属性因为layerbordercolor是CGColor.通过为CALayer增加属性可以实现在SB中也能用KVC设置layerbordercolor;新建CALayer的分类 阅读全文
posted @ 2016-01-21 21:56 菜鸟工程司 阅读(735) 评论(1) 推荐(1) 编辑
摘要: KVC简单使用: 可以用来设置属性的值例如有个Person类下有个属性name [self setvalue:@"yourname" forkey:@"name"] 和用_name = @"yourname";效果相同. 控制器中的某个控件也可以通过KVC来自定义 例如有个navigationcon 阅读全文
posted @ 2015-12-27 17:09 菜鸟工程司 阅读(292) 评论(0) 推荐(0) 编辑
摘要: 在info.plist添加字段App Transport Security Settings Allow Arbitrary Loads yes 阅读全文
posted @ 2015-12-22 10:31 菜鸟工程司 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 1,显示应用图标右上角的红色提示 application.applicationIconBadgeNumber = 10;2.修改状态栏的类型在当前控制器下设置- (UIStatusBarStyle)preferredStatusBarStyle{ return UIStatusBarStyle... 阅读全文
posted @ 2015-12-21 22:48 菜鸟工程司 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 今天在cell重用的时候出现一下错误reason: 'unable to dequeue a cell with identifier Cell - must register a nib or a class for the identifier or connect a prototype ce... 阅读全文
posted @ 2015-12-17 22:45 菜鸟工程司 阅读(1138) 评论(0) 推荐(0) 编辑
摘要: 今天在真机调试低版本系统的时候出现如题类似Layout Max Width在ios 8 之前不适用的问题,初步估计是autolayout 所导致的查找资料解决方法如下:将label下Preffered Width 设置成大于0. 阅读全文
posted @ 2015-12-02 21:22 菜鸟工程司 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 今天在用Xcode7.1上传APP Store ios7.1版本的时候出现如题的错误错误原因是在 Build Settings 中将Product name 设置成中文导致。改回英文名即可.修改项目名应设置info.plist中的Bundle name 为想要的名称即可. 阅读全文
posted @ 2015-12-02 21:15 菜鸟工程司 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 新建NSString的分类,代码如下#import "NSString+MD5.h"#import @implementation NSString (MD5)//32位- (NSString *)getMd5_32Bit { const char *cStr = [self UTF8Stri... 阅读全文
posted @ 2015-11-29 16:29 菜鸟工程司 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 有时我们在设置搜索框的时候底部会出现一条黑线,要 去除这黑线只需设置。[self.searchBar setBackgroundImage:[UIImage new]]; 阅读全文
posted @ 2015-11-25 23:41 菜鸟工程司 阅读(770) 评论(0) 推荐(0) 编辑