更新到iOS13后發(fā)現(xiàn)原來手寫代碼textField中占位字符顏色那里出現(xiàn)bug導致程序意外退出叼旋。報錯Access to UITextField's _placeholderLabel ivar is prohibited. This is an application bug留潦。原代碼為
[passWordField setValue:[UIColor lightGrayColor] forKeyPath:@"_placeholderLabel.textColor"];
簡單解決辦法為去掉那個下劃線能庆。原因如下
In iOS 13, we can not use KVC(valueForKey:, setValue:forKey:) to access some private APIs, it causes the crash of UISearchBar (QMUI), UINavigationBar (QMUI) and UITabBar (QMUI).