替换SearchBar 键盘上的 搜索 按钮

for (UIView *searchBarSubview in [searchBar subviews])
{
       if ([searchBarSubview conformsToProtocol:@protocol(UITextInputTraits)])
    {
               [(UITextField *)searchBarSubview setReturnKeyType:UIReturnKeyDone];
               [(UITextField *)searchBarSubview setEnablesReturnKeyAutomatically:NO];
       }
}
posted @ 2013-09-04 10:35  韦韦韦  阅读(314)  评论(0)    收藏  举报