UISearchBar iOS 7中的游标不可见 [英] Cursor invisible in UISearchBar iOS 7

查看:104
本文介绍了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

for 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天全站免登陆