iOS知识点积累2(高版本真机测试等)

2017-11-02  本文已影响23人  超_iOS

知识点1

1.程序被杀监听:

- (void)applicationWillTerminate:(UIApplication *)application {}

2.高版本真机测试
将下载的真机包放在:
Xcode.app//Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport

3.按钮左文字右图片:

[btn setTitleEdgeInsets:UIEdgeInsetsMake(0, -
 btn.imageView.frame.size.width, 0, btn.imageView.frame.size.width)];
[btn setImageEdgeInsets:UIEdgeInsetsMake(0, btn.titleLabel.bounds.size.width, 0, - btn.titleLabel.bounds.size.width)];

按钮上图片下文字:

[btn setTitleEdgeInsets:UIEdgeInsetsMake(btn.imageView.frame.size.height ,-
 btn.imageView.frame.size.width, 0.0,0.0)];//文字距离上边框的距离增加imageView的高度,距离左边框减少imageView的宽度,距离下边框和右边框距离不变  
[btn setImageEdgeInsets:UIEdgeInsetsMake(0.0, 0.0,0.0, -
 btn.titleLabel.bounds.size.width)];//图片距离右边框距离减少图片的宽度,其它不边
  1. 检测代码行数
    https://github.com/jkpang/PPRows
上一篇 下一篇

猜你喜欢

热点阅读