iOS13+Xcode11適配

蘋果發(fā)病了 所以適配開始 參考iOS 13 適配iOS13 新特性簡介、iOS13 暗黑模式(Dark Mode)適配之OC版iOS 13 適配 ING...、iOS 13 適配(持續(xù)更新)iOS 13 適配總結(jié)、iOS 13 以及深色模式(黑暗模式Dark Mode)的適配

KVC訪問私有屬性崩潰

  • textField的placeholder的字體顏色設(shè)置---改成可變富文本
  • 把項目中的KVC訪問都去掉吧 如UIAlertAction

presentViewController

  • modalPresentationStyle:是全屏 必須加上
  • modalTransitionStyle:UIModalTransitionStylePartialCurl 翻頁效果動畫有問題不能用了

TextField、TextView、UIButton、UI label 字體顏色需要設(shè)置

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必須設(shè)置contentView的背景顏色

  • 給定默認(rèn)顏色
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.backgroundColor = [UIColor whiteColor];
    }
    return self;
}

BaseUITableViewCell 制作一個basecell 如果不寫賦值 則默認(rèn)白色
#import "BaseUITableViewCell.h"

禁止黑色模式如果不想適配的話

A39F98256B6657396A4976D7146505B5.jpg

F4F3ABB722B9186FF3E6CC701E0ECD7D.jpg

顏色

iOS13.png
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

友情鏈接更多精彩內(nèi)容