Skip to content
This repository has been archived by the owner on Jul 2, 2020. It is now read-only.

你好,针对iOS13的修改,是不是不太严谨? #117

Closed
ncwubird opened this issue Aug 14, 2019 · 1 comment
Closed

你好,针对iOS13的修改,是不是不太严谨? #117

ncwubird opened this issue Aug 14, 2019 · 1 comment

Comments

@ncwubird
Copy link

#if defined(__IPHONE_13_0)
UISearchTextField *searchField = obj.searchTextField;
searchField.keyboardAppearance = UIKeyboardAppearanceDefault;
#elif defined(__IPHONE_7_0)
UITextField *searchField = [obj valueForKey:@"_searchField"];
searchField.keyboardAppearance = UIKeyboardAppearanceDefault;
#else
obj.keyboardAppearance = UIKeyboardAppearanceDefault;
#endif

我的iphone是iOS 12.4,在使用Xcode 11调试时,会出现闪退,是否应该加上下面类似的处理?
#if defined(__IPHONE_13_0)
if (@available(iOS 13, *)) {
UISearchTextField *searchField = obj.searchTextField;
searchField.keyboardAppearance = UIKeyboardAppearanceDefault;
}

@fabiosoft
Copy link
Contributor

take a look here... #118

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants