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];