1、presentViewController 默認(rèn)有視差效果
iOS 13 的 presentViewController 默認(rèn)有視差效果,模態(tài)出來的界面現(xiàn)在默認(rèn)都下滑返回。 一些頁面必須要點(diǎn)確認(rèn)才能消失的,需要適配。如果項(xiàng)目中頁面高度全部是屏幕尺寸,那么多出來的導(dǎo)航高度會(huì)出現(xiàn)問題。
如圖所示

1FF24E89A084A7007156102D11065A59.jpg
在tabBar里面寫
// Swift
self.modalPresentationStyle = .fullScreen
// Objective-C
self.modalPresentationStyle = UIModalPresentationFullScreen;
2、KVC 限制
iOS13 以后已經(jīng)不能肆無忌憚的通過 KVC 來修改一些沒有暴露出來的屬性了。
例如:
// UITextField 的 _placeholderLabel
[textField setValue:[UIColor xxx] forKeyPath:@"_placeholderLabel.textColor"];
// UISearchBar 的 _searchField
[searchBar valueForKey:@"_searchField"];