我最近提交了一个应用程序进行应用程序审核,但由于使用了私有 API 而被拒绝。我对 iPhone 开发还是有点陌生,所以我想知道是否有人可以帮助我理解这部分是如何被拒绝的:
UISearchBar *searchBar = [[[UISearchBar alloc] initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width, 0)] autorelease];
searchBar.showsCancelButton = NO;
searchBar.placeholder = @"Search Exhibitors";
[searchBar sizeToFit];
[self.tableView setTableHeaderView:searchBar];
UISearchDisplayController *searchDisplayController = [[UISearchDisplayController alloc] initWithSearchBar:searchBar contentsController:self];
[self performSelector:@selector(setSearchDisplayController:) withObject:searchDisplayController];
[searchDisplayController setDelegate:self];
[searchDisplayController setSearchResultsDataSource:self];
[searchDisplayController setSearchResultsDelegate:self];
[searchDisplayController release];
他们提到的部分是“setSearchDisplayController”。我基于给定的示例搜索 UITableViewhere。那么谁能解释一下为什么这被认为是私有 API 呢?
Is -setSearchDisplayController:
文档中的任何地方都提到过(我不认为是)?
如果不是,那么它就不是公共 API。
事实上你必须使用-performSelector:withObject:
并且不能直接调用它是另一个赠品。-setSearchDisplayController
显然不包含在任何头文件中。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)