gpt4 book ai didi

ios - ios6中UISearchBar setBarTintColor无法识别的选择器异常

转载 作者:行者123 更新时间:2023-11-28 18:35:09 25 4
gpt4 key购买 nike

我在 iOS6 中有一个异常(exception):

-[UISearchBar setBarTintColor:]: unrecognized selector sent to instance 0xad94250 

但是我的代码中没有这个方法。我该如何解决这个问题?

最佳答案

barTintColor 适用于 iOS 7 及更高版本,因此它仅适用于 iO7 及更高版本

@property(nonatomic,retain) UIColor *barTintColor NS_AVAILABLE_IOS(7_0) UI_APPEARANCE_SELECTOR;  // default is nil

对于 iOS 6.1 及更低版本你必须使用

@property(nonatomic,retain) UIColor *tintColor;

关于ios - ios6中UISearchBar setBarTintColor无法识别的选择器异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20535185/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com