iOS13適配中遇到的問(wèn)題

1. presentViewController控制器不占全屏

解決辦法

UINavigationViewController * loginNav=[[WENavigationVC alloc] initWithRootViewController:loginVC];
    loginNav.modalPresentationStyle =UIModalPresentationOverFullScreen;
    [self.navigationController presentViewController:loginNav animated:NO completion:^{
        
    }];
注意一定是UIModalPresentationOverFullScreen,如果不小心看錯(cuò)用了UIModalPresentationFullScreen 會(huì)導(dǎo)致按home鍵返回桌面后Controller自動(dòng)dismiss

2.修改UITextField占位符字體顏色

原來(lái)的方法

[self setValue:color forKeyPath:@"placeholderLabel.textColor"];
[self setValue:font forKeyPath:@"placeholderLabel.font"];

現(xiàn)在合并為一個(gè)


self.attributedPlaceholder=[[NSAttributedString alloc] initWithString:placeHolder attributes:@{NSForegroundColorAttributeName:color,NSFontAttributeName:font}];

iOS13中用原來(lái)的方法會(huì)不起作用,也有人說(shuō)會(huì)導(dǎo)致crash,我這邊是在手機(jī)設(shè)置深色模式下不起作用

3.UITableView背景變黑

深色模式下UITableView如果沒(méi)有設(shè)置背景色會(huì)變黑,需要設(shè)置

_tableview.backgroundColor=[UIColor whiteColor];

使用了融云SDK,繼承了RCConversationListViewController需要在
viewDidLoad中設(shè)置

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

相關(guān)閱讀更多精彩內(nèi)容

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