摘要: //当键盘出现或改变时调用 - (void)keyboardWillShow:(NSNotification *)aNotification { NSDictionary *userInfo = [aNotification userInfo]; NSValue *aValue = [userInf 阅读全文
posted @ 2017-06-26 11:30 日月哥哥 阅读(350) 评论(0) 推荐(0)
摘要: Button.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;//左对齐(UIControlContentHorizontalAlignment、CenterUIControlContentHorizontal 阅读全文
posted @ 2017-06-12 16:29 日月哥哥 阅读(416) 评论(0) 推荐(0)
摘要: 1.placehold 使用KVC机制改变占位符的颜色和大小 阅读全文
posted @ 2017-06-12 11:25 日月哥哥 阅读(189) 评论(0) 推荐(0)
摘要: 1. 改变指定字符的颜色 NSString * text = [NSString stringWithFormat:@"%@米",distance]; NSMutableAttributedString *attributedStr = [[NSMutableAttributedString all 阅读全文
posted @ 2017-05-18 14:22 日月哥哥 阅读(356) 评论(0) 推荐(0)
摘要: 在 UIImage+MultiFormat这个类里面添加如下压缩方法, +(UIImage *)compressImageWith:(UIImage *)image { float imageWidth = image.size.width; float imageHeight = image.si 阅读全文
posted @ 2017-05-18 14:16 日月哥哥 阅读(1381) 评论(0) 推荐(0)
摘要: 1.分割字符串 NSString * str1 = @"123/456"; NSArray * arr1 = [str1 componentsSeparatedByString:@"/"]; //根据 "/" 把字符串分割 2.截取字符串(字符串下标从0开始数) (1)截取到第N位(不包含第N位) 阅读全文
posted @ 2017-04-07 15:53 日月哥哥 阅读(209) 评论(0) 推荐(0)
摘要: 1.duplicate symbols for architecture armv7 1、首先排查是否有名字重复的文件; 2、检查是否在#import头文件的时候,不小心把.h写成了.m。 2.reason: '-[__NSCFArray bytes]: unrecognized selector 阅读全文
posted @ 2017-03-28 16:22 日月哥哥 阅读(238) 评论(0) 推荐(0)
摘要: 记录一下极光推送集成的一些食粮: 推送的要点无非:远程推送,本地推送,badge角标值的设定等。 1.badge [[UIApplicationsharedApplication]setApplicationIconBadgeNumber:0];//本地badge值设置 [JPUSHServices 阅读全文
posted @ 2017-03-22 15:46 日月哥哥 阅读(902) 评论(0) 推荐(0)
摘要: 童鞋们有么有遇到过一个tableview或者是scrollview上放置一个button然后点击button,但是button的高亮状态切换不过来呢? 解决方案: 新建一个类继承自UITableView或者UIScrollView,然后 (1)tableview - (id)initWithFram 阅读全文
posted @ 2017-03-08 16:50 日月哥哥 阅读(214) 评论(0) 推荐(0)
摘要: 可编程序中的存储区域基本上分为:静态存储区,栈区,堆区,代码区。 1.静态存储区(全局存储区):该块内存在程序编译期间就已经分配好,并且在程序运行期间都一直存在,主要用于存储静态数据,全局数据和常量。 被static修饰的局部变量存储在这里,普通的局部变量存储在栈里。 2.栈:编译器在需要的时候再分 阅读全文
posted @ 2017-02-24 16:31 日月哥哥 阅读(182) 评论(0) 推荐(0)