简体   繁体   English

IOS专用API是否会影响App Store上的应用发布?

[英]Will IOS private API affect the app publishing on App Store?

I have used the titleForSwipeAccessoryButtonForRowAtIndexPath , swipeAccessoryButtonPushedForRowAtIndexPath (For IOS 7) and editActionsForRowAtIndexPath (For IOS 8) on my app. 我在我的应用程序上使用了titleForSwipeAccessoryButtonForRowAtIndexPathswipeAccessoryButtonPushedForRowAtIndexPath (对于IOS 7)和editActionsForRowAtIndexPath (对于IOS 8)。

The purpose that I add these two APIs which is for using the swipe to show the delete button which is for delete the items of the row and share button which is for sharing the contents of the row on facebook, whatsapp, twitter etc. And my client need these functions. 我添加这两个API的目的是使用滑动显示删除按钮(用于删除行的项目)和共享按钮(用于在Facebook,whatsapp,twitter等上共享行的内容)。客户需要这些功能。

The titleForSwipeAccessoryButtonForRowAtIndexPath and swipeAccessoryButtonPushedForRowAtIndexPath are private APIs. titleForSwipeAccessoryButtonForRowAtIndexPathswipeAccessoryButtonPushedForRowAtIndexPath是私有API。 Will my App be rejected by Apple when I publish my App on App Store? 当我在App Store上发布我的App时,Apple会拒绝我的App吗?

You need not to worry about the app rejection from the apple if you are using this private API's. 如果您正在使用此私有API,则不必担心苹果会拒绝应用程序。 But make sure that the app doesn't crash while using this API's. 但是请确保该应用在使用此API时不会崩溃。 Also, if you are targeting this app for iOS 8.0 or higher, you can achieve this by implementing following method. 另外,如果您要针对iOS 8.0或更高版本定位此应用,则可以通过实施以下方法来实现此目的。 After this you do not have to worry about any rejection. 此后,您不必担心任何拒绝。

    -(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...
}

It is easy to implement and you can add as many buttons as you want to add. 它易于实现,您可以添加想要添加的任意数量的按钮。 Also, implement below delegate method for this code to work. 另外,实现下面的委托方法以使此代码起作用。

-(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath

Cheers..!! 干杯..!!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM