您的位置:首页 > 其它

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后面是错误内存地址)

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是包含了状态栏的。在选择时可以点下剪头即可。

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: