【发布时间】:2016-02-16 22:46:30
【问题描述】:
我想在 Swift 中使用用 Objective-C 编写的委托方法。该方法包含在MGSwipeTableCell 框架(MGSwipeTableCell.h)中。
目标-C:
-(BOOL) swipeTableCell:(MGSwipeTableCell*) cell tappedButtonAtIndex:(NSInteger) index direction:(MGSwipeDirection)direction fromExpansion:(BOOL) fromExpansion;
我尝试将其转换为 Swift 并使用该方法:
func swipeTableCell(cell:MGSwipeTableCell, index:Int, direction:MGSwipeDirection, fromExpansion:Bool) -> Bool {
return true
}
但我不知道为什么,但该函数没有被调用。我有什么问题吗?我就是想用这个函数获取被刷过的cell的indexPath。
【问题讨论】:
标签: objective-c swift interop