摘要: 当[UIImage imageNamed:imageName] 中 的imageName为空时,系统会打印出:CUICatalog: Invalid asset name supplied: 这种信息,这是因为UIImage加载的图片名称是无效的,imageName不能是空值。 如果想实现在点击一个 阅读全文
posted @ 2017-11-10 17:25 温水青蛙。 阅读(431) 评论(0) 推荐(0) 编辑
摘要: cocoapods 安装 查看cocoapods 源: gem sources -l 1、删除已安装的源 gem sources —remove https://rubygems.org/ 2、添加安装包的源 gem sources --a https://ruby.taobao.org/ 3、安装 阅读全文
posted @ 2017-11-10 15:00 温水青蛙。 阅读(192) 评论(0) 推荐(0) 编辑
摘要: xcode 报错: failed to find PDF header: `%PDF' not found. /* com.apple.actool.errors */ : error: Failed to read file attributes for "/Users/admin/Desktop 阅读全文
posted @ 2017-11-10 15:00 温水青蛙。 阅读(1644) 评论(0) 推荐(0) 编辑
摘要: 文字高度的适配 一、单行适配, 根据字体得到NSString的尺寸 CGSize size = [firstStr sizeWithAttributes:[NSDictionary dictionaryWithObjectsAndKeys:fnt,NSFontAttributeName,nil]]; 阅读全文
posted @ 2017-11-10 14:59 温水青蛙。 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 某一页面强制横屏: 一、首先 在项目里面设置Device Orientation允许转屏的方向,下面设置了竖屏,和横屏(横屏左右根据home键确定): 二、AppDelagate代码 AppDelagate.h文件 @property (nonatomic,assign)BOOL allowRota 阅读全文
posted @ 2017-11-10 14:58 温水青蛙。 阅读(312) 评论(0) 推荐(0) 编辑
摘要: 检测手机的屏幕方向: 一、在需要检测的页面里的ViewDidLoad方法里注册通知: [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications]; [[NSNotificationCenter defaultCen 阅读全文
posted @ 2017-11-10 14:57 温水青蛙。 阅读(603) 评论(0) 推荐(0) 编辑
摘要: 处理接口里不支持的转义特殊字符: NSCharacterSet *URLCombinedCharacterSet = [[NSCharacterSet characterSetWithCharactersInString:@"\"#%/,:<>?@[\\]^`{|}"]invertedSet]; N 阅读全文
posted @ 2017-11-10 14:56 温水青蛙。 阅读(319) 评论(0) 推荐(0) 编辑
摘要: atos命令符化号crash文件 一、用atos命令来符号化某个特定模块加载地址 以下面的一行crash日志为例: 3 iOSApp 0x000bd89d 0x1a000 669853 1.将需要符号化的.ipa文件和.dSYM 两个文件放在同一个文件夹下; 2.打开终端cd 进入存放上面两个文件的 阅读全文
posted @ 2017-11-10 14:55 温水青蛙。 阅读(1108) 评论(0) 推荐(0) 编辑
摘要: HTTPS证书转换 (1),当后台派发证书给你的时候,到手的证书可能是.crt格式的,这个时候需要把.crt格式的证书转换成.cer(操作方法:进到证书路径,执行下面语句 // openssl x509 -in 你的证书.crt -out 你的证书.cer -outform der 这样你就可以得到 阅读全文
posted @ 2017-11-10 14:38 温水青蛙。 阅读(220) 评论(0) 推荐(0) 编辑