光标在 UISearchBar iOS 7 中不可见 [英] Cursor invisible in UISearchBar iOS 7

查看:24
本文介绍了光标在 UISearchBar iOS 7 中不可见的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 UITableView 中有 UISearchBar 作为表头.当我按下 UISearchBar 开始搜索时,这个方法被触发

I have UISearchBar in UITableView as a table header. When I push the UISearchBar for start searching, this method is being triggered

- (BOOL)searchBarShouldBeginEditing:(UISearchBar *)searchBar

对于UISearchDisplayController.

结果就是这样;

如您所见,没有光标,我可以开始输入和搜索,一切正常.此外,它仅在 iOS 7 中不可见.但是,在 iOS 6.1 和 iOS 7.1 Beta 3 中,我可以看到光标.那么如何使 UISearchBar 光标可见,或者如何在 UISearchBar 中添加光标?

As you can see, there is no cursor, I can start typing and search, everything works fine. Also it's invisible only in iOS 7. However, with iOS 6.1 and iOS 7.1 Beta 3 I could see the cursor. So how can I make UISearchBar cursor visible or how can I add cursor in my UISearchBar?

推荐答案

搜索栏中的光标从搜索栏 -> 视图 -> 色调属性中获取颜色.在您的情况下,它设置为白色,因此它变得不可见.

Cursor in the search bar takes color from Search Bar -> View -> Tint Color property. In your case, it is set to White color, so it becomes invisible.

这篇关于光标在 UISearchBar iOS 7 中不可见的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆