[英]Will IOS private API affect the app publishing on App Store?
我在我的应用程序上使用了titleForSwipeAccessoryButtonForRowAtIndexPath
, swipeAccessoryButtonPushedForRowAtIndexPath
(对于IOS 7)和editActionsForRowAtIndexPath
(对于IOS 8)。
我添加这两个API的目的是使用滑动显示删除按钮(用于删除行的项目)和共享按钮(用于在Facebook,whatsapp,twitter等上共享行的内容)。客户需要这些功能。
titleForSwipeAccessoryButtonForRowAtIndexPath
和swipeAccessoryButtonPushedForRowAtIndexPath
是私有API。 当我在App Store上发布我的App时,Apple会拒绝我的App吗?
如果您正在使用此私有API,则不必担心苹果会拒绝应用程序。 但是请确保该应用在使用此API时不会崩溃。 另外,如果您要针对iOS 8.0或更高版本定位此应用,则可以通过实施以下方法来实现此目的。 此后,您不必担心任何拒绝。
-(NSArray *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewRowAction *button = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"Delete" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath) {
//do whatever you want to do...
}
它易于实现,您可以添加想要添加的任意数量的按钮。 另外,实现下面的委托方法以使此代码起作用。
-(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
干杯..!!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.