iOS13+Xcode11适配

苹果发病了 所以适配开始 参考iOS 13 适配iOS13 新特性简介iOS13 暗黑模式(Dark Mode)适配之OC版iOS 13 适配 ING...iOS 13 适配(持续更新)iOS 13 适配总结iOS 13 以及深色模式(黑暗模式Dark Mode)的适配

KVC访问私有属性崩溃

  • textField的placeholder的字体颜色设置---改成可变富文本
  • 把项目中的KVC访问都去掉吧 如UIAlertAction

presentViewController

  • modalPresentationStyle:是全屏 必须加上
  • modalTransitionStyle:UIModalTransitionStylePartialCurl 翻页效果动画有问题不能用了

TextField、TextView、UIButton、UI label 字体颜色需要设置

NSMutableAttributedString *placeholder = [[NSMutableAttributedString alloc]initWithString:@""];
placeholder.font = [UIFont systemFontOfSize:14*ADAPTER_WIDTH weight:UIFontWeightRegular];
placeholder.color = kColor160;
tf.attributedPlaceholder = placeholder;


if (itemModel != nil && itemModel.placeholder != nil) {
    NSMutableAttributedString *placeholder = [[NSMutableAttributedString alloc]initWithString:itemModel.placeholder];
    placeholder.font = [UIFont systemFontOfSize:14*ADAPTER_WIDTH weight:UIFontWeightRegular];
    placeholder.color = kColor160;
    self.textField.attributedPlaceholder = placeholder;
}

UITableViewCell 颜色 UICollectionView不需要管 UITableViewHeaderFooterView必须设置contentView的背景颜色

  • 给定默认颜色
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.backgroundColor = [UIColor whiteColor];
    }
    return self;
}

BaseUITableViewCell 制作一个basecell 如果不写赋值 则默认白色
#import "BaseUITableViewCell.h"

禁止黑色模式如果不想适配的话

A39F98256B6657396A4976D7146505B5.jpg

F4F3ABB722B9186FF3E6CC701E0ECD7D.jpg

颜色

iOS13.png
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。