开发者

SearchBar doesn't work when I type the uppercase alphabet

In my iPhone app, I have a SearchBar and when people type a keyword and click to search, the search result will show 开发者_运维百科in UILabel.

Everything works fine but when I type a keyword which starts with uppercase letters, the search does not work as it should. I know I have to do something but don´t know what.

Anybody have an idea?


May be its trying to match the case as well, try converting the keyword to lower or uppercase and also convert the string with which you are comparing to the same case (lower or upper).

One more option is to specify the search comparison to be case-insensitive, if you are using some built-in functions for that.

Thanks

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜