源码介绍MGSwipeTableCell是UITableViewCell的子类,它使用各种过渡方式显示可点击的按钮。这个库与创建UITableViewCell的所有不同方式兼容。源代码运行屏幕截图//callconvenienceblockcallbackifexits(usageofMGSwipeButtonclassisnotcompulsory)autoHide=[senderperformSelector:@selector(callMGSwipeConvenienceCallback:)withObject:_cell];}#pragmaclangdiagnosticpopif(_cell.delegate&&[_cell.delegaterespondsToSelector:@selector(swipeTableCell:tappedButtonAtIndex:direction:fromExpansion:)]]=[_buttonsindexOfObject:sender];if(!_fromLeft){index=_buttons.count-index-1;//rightbuttonsarereversed}自动隐藏|=[_cell.delegateswipeTableCell:_celltappedButtonAtIndex:indexdirection:_fromLeft?MGSwipeDirectionLeftToRight:MGSwipeDirectionRightmExpansion:fromExpansion];}if(fromExpansion){_expandedButton=nil;_cell.swipeOffset=0;}elseif(autoHide){[_cellhideSwipeAnimated:YES];}}源码下载:http://down.51cto.com/data/1985034
