How can I change strings of “Cancel” button, “No Results” label in UISearchBar of UISearchDisplayController?

前端 未结 4 1204
借酒劲吻你
借酒劲吻你 2020-12-02 18:05

How can I change strings of \"Cancel\" button, \"No Results\" label in UISearchBar of UISearchDisplayController?

4条回答
  •  天命终不由人
    2020-12-02 18:29

    In order to change the "no result" text you can use :

    [self.searchDisplayController setValue:@"my no result text"  forKey: @"noResultsMessage"];
    

    I've just tested in iOS8

提交回复
热议问题