Uitableview UISearchDisplayController中的searchResultsTitle不工作

Uitableview UISearchDisplayController中的searchResultsTitle不工作,uitableview,uiviewcontroller,nsstring,uisearchbar,uisearchdisplaycontroller,Uitableview,Uiviewcontroller,Nsstring,Uisearchbar,Uisearchdisplaycontroller,我想自定义UISearchDisplayController中的“无结果”字符串。在文档中,您可以找到UISearchDisplayController具有属性searchresultsttitle,正如我所认为的,该属性应该更改此字符串,但它不起作用。 请帮助在iOS 5及以上版本中自定义“无结果”字符串。为什么searchResultsTitle不起作用?UISearchResultsTitle的searchResultsTitle属性实际上并不控制无结果文本。如果查看UISearchDis

我想自定义
UISearchDisplayController
中的“无结果”字符串。在文档中,您可以找到
UISearchDisplayController
具有属性
searchresultsttitle
,正如我所认为的,该属性应该更改此字符串,但它不起作用。

请帮助在iOS 5及以上版本中自定义“无结果”字符串。为什么
searchResultsTitle
不起作用?
UISearchResultsTitle
searchResultsTitle
属性实际上并不控制无结果文本。如果查看
UISearchDisplayController
的实例变量,您将看到
\u resultsTitle
\u noResultsMessage
\u noResultsMessage
控制无结果文本,但不幸的是没有公共属性

不过,您可以使用undocumented实例变量使用以下代码设置自定义消息:

@try
{
    [self.searchDisplayController setValue:@"No Results, try again later." forKey:[@[@"no", @"Results", @"Message"] componentsJoinedByString:@""]];
}
@catch (NSException *exception) {}

至于
searchResultsTitle
,文档太少了,我不知道它控制着什么

您是否使用上述代码段访问生产代码中的私有属性?它是否在应用程序审查过程中获得批准?我在我的生产代码中没有使用此特定示例,但我使用了相同的
组件通过字符串连接:@“
技术获得批准。感谢0xced回来。根据批准-苹果(可能)似乎只是检查二进制的链接符号/库,这是好是坏。