1、自定义cell中的方法-awakeFromNib必须先执行[super awakeFromNib];
2、iOS10之后UIScrollView新增refreshControl属性,只适用于iOS10之后的系统;
iOS10之前的版本的方法在iOS10系统上依然有效。
iOS10之前版本:
iOS10版本:
3、调用手机相机、相册
1)调用手机相机报错:
[access] This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSCameraUsageDescription key with a string value explaining to the user how the app uses this data.
解决方法:
在info.plist文件中添加NSCameraUsageDescription(复制、粘贴即可)
2)调用相册报错:
[access] This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSPhotoLibraryUsageDescription key with a string value explaining to the user how the app uses this data.
解决方法:
在info.plist文件中添加NSPhotoLibraryUsageDescription(复制、粘贴即可)
添加后效果:
4、cell中两个或两个以上Label在一行中的自动布局:
因为在iOS10中,Label的字的大小相对变大,所以之前label的width/height如果固定了大小可能会有问题。
解决方法:
label的width/height设置为“>=某个值”即可解决问题。