Ios 未调用SWTableViewCell委托方法

Ios 未调用SWTableViewCell委托方法,ios,uitableview,delegates,Ios,Uitableview,Delegates,我是IOS新手,因此我无法100%确定为什么在我的SWTableViewCell实现中没有调用委托方法。该库可在以下位置找到: 我有一个tableViewController.h文件,如下所示: #import <UIKit/UIKit.h> #import "SWTableViewCell.h" #import <AVFoundation/AVFoundation.h> @interface ICIRecordingsViewController : UITableV

我是IOS新手,因此我无法100%确定为什么在我的SWTableViewCell实现中没有调用委托方法。该库可在以下位置找到:

我有一个tableViewController.h文件,如下所示:

#import <UIKit/UIKit.h>
#import "SWTableViewCell.h"
#import <AVFoundation/AVFoundation.h>

@interface ICIRecordingsViewController : UITableViewController <SWTableViewCellDelegate, AVAudioPlayerDelegate>
@property (nonatomic, strong) NSArray *documentArray;
@property (strong, nonatomic) AVAudioPlayer *audioPlayer;
@property (strong, nonatomic) SWTableViewCell *previousCell;
@end
ICIrecordingCell.h文件如下所示:

#import <UIKit/UIKit.h>
#import "SWTableViewCell.h"

@interface ICIRecordingCell : SWTableViewCell
@property (weak, nonatomic) IBOutlet UILabel *title;
@property (weak, nonatomic) IBOutlet UIButton *playButton;

@end

我已经在委托方法上设置了一个断点,但是当按钮被点击时,什么都不会被点击。有什么想法吗?

行单元格和SWTableViewCell上的辅助视图似乎有问题。该附件似乎抓住了触摸事件,并没有将其传递到SWTableViewCell创建的按钮。目前,我已经禁用了附件视图,代理调用正在按预期进行。

对于任何对SWTableViewCell是什么感到困惑的人,。谢谢-是将编辑我的问题SWTableViewCell接受代理。您在哪里设置它?我在按钮中写入时已在cellForRowAtIndexPath方法中设置了它。它是这样的:cell.rightUtilityButtons=myButtons;然后cell.delegate=self;返回单元;您应该编辑您的问题以显示cellForRowAtIndexPath代码。
#import <UIKit/UIKit.h>
#import "SWTableViewCell.h"

@interface ICIRecordingCell : SWTableViewCell
@property (weak, nonatomic) IBOutlet UILabel *title;
@property (weak, nonatomic) IBOutlet UIButton *playButton;

@end
-(void) swipeableTableViewCell:(SWTableViewCell *)cell didTriggerRightUtilityButtonWithIndex:(NSInteger)index{
    switch(index){
        case 0:{
            UIActionSheet *shareActionSheet = [[UIActionSheet alloc] initWithTitle:@"Share" delegate:nil cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"Share on FaceBook", @"Share on Twitter", nil];
            [shareActionSheet showInView:self.view];

            [cell hideUtilityButtonsAnimated:YES];
            break;
        }
        case 1:{
            NSIndexPath *cellIndexPath = [self.tableView indexPathForCell:cell];
            //need to figure out how to delete the item from the file system
            [self.tableView deleteRowsAtIndexPaths:@[cellIndexPath] withRowAnimation:UITableViewRowAnimationLeft];
             break;
        }
        default:break;
    }
}