遇到問題,線上項(xiàng)目赛蔫,在ios 13上砂客,點(diǎn)擊搜索框的時(shí)候,發(fā)生閃退呵恢。
查找原因得知鞠值, UISearchBar成為第一響應(yīng)者時(shí),程序直接閃退了渗钉。提示 -[UIView setGrowingHook_textChangeNumber:]: unrecognized selector sent to instance 0x7fd697496d30彤恶。
解決方法:升級(jí)GrowingIO sdk到最新版本解決遇到問題,UISearchBar 設(shè)置字體的時(shí)候鳄橘,發(fā)生閃退
ios13 不可以通過設(shè)置獲取私有屬性進(jìn)行修改声离,這一塊是個(gè)大問題,大家可以在項(xiàng)目中瘫怜,進(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 會(huì)漏出1/4左右
因?yàn)樘O果給模態(tài)選項(xiàng)modalPresentationStyle 又增加了一個(gè)新的automatic模式
解決方法:controller.modalPresentationStyle = .fullScreen
- 遇到問題赠涮,在ios13上面直接修改cell的alpha無效果
解決方法:修改cell.contentView的alpha