您必须访问
UITextFieldUISearchBar内部。您可以通过使用
valueForKey("searchField")
var textFieldInsideSearchBar = yourSearchbar.valueForKey("searchField") as? UITextFieldtextFieldInsideSearchBar?.textColor = yourcolor
Swift 3更新
let textFieldInsideSearchBar = yourSearchbar.value(forKey: "searchField") as? UITextFieldtextFieldInsideSearchBar?.textColor = yourcolor
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)