some small tips
2016-01-07 17:09
260 查看
1.@()做啥了
NSInteger number=500;
[NSString stringWithFormat:@“%@", @(number)];
其中@(number)会把number转换成一个NSNumber对象
2.运行Xcode弹框"Developer
tools access" 需控制另一个进程。。。
找到xcode的证书,在keychain里找到此证书(登录-我的证书里),然后在密钥里找到证书对应的Key,双击此key,选择访问控制(access control),点击允许所有application访问。
3.崩溃log查询
命令:(其中grep后面是dsym uuid,arm64是指令集(iPhone 6)lookup后面是错误内存地址)
4. 关于图片拉伸iOS6之后出现的两种mode
UIImageResizingModeTile 和 UIImageResizingModeStretch
tile模式是平铺,stretch模式是拉伸
平铺会遇到的问题如:http://www.cnblogs.com/heyonggang/archive/2013/12/19/3482733.html
解决方法就是把inset设置小点
而拉伸时inset设置不太好也会造成有的地方能看出拉伸效果
5.关于autolayout constraints里的top space to superview和 top space to Top Layout Guide
见图: top space to Top Layout Guide是离状态栏的top,Top Layout Guide是状态栏
top space to superview是相对于superview的top
而storyboard里拉一个UIViewController 根view是包含了状态栏的。在选择时可以点下剪头即可。
NSInteger number=500;
[NSString stringWithFormat:@“%@", @(number)];
其中@(number)会把number转换成一个NSNumber对象
2.运行Xcode弹框"Developer
tools access" 需控制另一个进程。。。
找到xcode的证书,在keychain里找到此证书(登录-我的证书里),然后在密钥里找到证书对应的Key,双击此key,选择访问控制(access control),点击允许所有application访问。
3.崩溃log查询
命令:(其中grep后面是dsym uuid,arm64是指令集(iPhone 6)lookup后面是错误内存地址)
export dSYMPath="$(find ~/Library/Developer/Xcode -iname '*.dSYM' -print0 | xargs -0 dwarfdump -u | grep 3BB9DDF2-B203-34C9-8ADF-101ACC6C1270 | sed -E 's/^[^/]+//' | head -n 1)";dwarfdump --arch=arm64 --lookup 0x1002e6818 "$dSYMPath"
4. 关于图片拉伸iOS6之后出现的两种mode
UIImageResizingModeTile 和 UIImageResizingModeStretch
tile模式是平铺,stretch模式是拉伸
平铺会遇到的问题如:http://www.cnblogs.com/heyonggang/archive/2013/12/19/3482733.html
解决方法就是把inset设置小点
而拉伸时inset设置不太好也会造成有的地方能看出拉伸效果
5.关于autolayout constraints里的top space to superview和 top space to Top Layout Guide
见图: top space to Top Layout Guide是离状态栏的top,Top Layout Guide是状态栏
top space to superview是相对于superview的top
而storyboard里拉一个UIViewController 根view是包含了状态栏的。在选择时可以点下剪头即可。
相关文章推荐
- IOS-添加分段控件SegmentControl
- 获取本地路径的方法,在沙河路径中保存图片 ,将保存文件到沙河路径下 把图片转换成NSData类型的数据来保存文件
- addView和getChildAt
- swift学习01-基础语法(常量,变量,流程控制)
- Jekyll解决The 'pygments' configuration option has been renamed to 'highlighter'
- CSS Flex-box示例代码
- 验证用户登录时用户名和密码是否正确及如何防止sql注入
- “关于Android系统的指纹识别安全性”文章引来的讨论
- 2016最新iOS开发者证书申请及安装教程
- 使用ASIHTTPRequest 编译提示找不到"libxml/HTMLparser.h"的解决方法
- struts.xml中的配置常量的含义
- Lepus经历收获杂谈(一)——confirm features的小工具
- swift学习笔记之全局变量和全局方法
- 逻辑回归(logistic regression)
- javascript中select下拉框的用法总结
- linux软件源码安装管理
- 最全面的linux信号量解析
- android 获取组件尺寸大小(转载)
- 服务启动报错
- android 广播实现activity之间的通讯