遇到問題,線上項目,在ios 13上,點擊搜索框的時候,發(fā)生閃退。
查找原因得知, UISearchBar成為第一響應(yīng)者時,程序直接閃退了。提示 -[UIView setGrowingHook_textChangeNumber:]: unrecognized selector sent to instance 0x7fd697496d30。
解決方法:升級GrowingIO sdk到最新版本解決遇到問題,UISearchBar 設(shè)置字體的時候,發(fā)生閃退
ios13 不可以通過設(shè)置獲取私有屬性進(jìn)行修改,這一塊是個大問題,大家可以在項目中,進(jìn)行全局檢索。
解決方法:ios 13新增UISearchTextField,可以直接修改searchTextField
if #available(iOS 13, *) {
self.topsearchbar.searchTextField.font = UIFont.systemFont(ofSize: 13)
} else {
if let textField = self.topsearchbar.value(forKey: "_searchField") as? UITextField
{
textField.font = UIFont.systemFont(ofSize: 13)
}
}
- 遇到問題,在ios 13上模態(tài)的controller 會漏出1/4左右
因為蘋果給模態(tài)選項modalPresentationStyle 又增加了一個新的automatic模式
解決方法:controller.modalPresentationStyle = .fullScreen
- 遇到問題,在ios13上面直接修改cell的alpha無效果
解決方法:修改cell.contentView的alpha