[英]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.