iOS - 无约束的可滑动 UITableCells

iOS - Swipeable UITableCells Without Constraints

我正在做一个项目,我需要使用 3 个故事板,一个用于 iPhone 5,另一个用于 iPhone 6,最后一个用于 iPhone 6+ .我需要实现 Swipeable UITableCells 以在该项目中显示更多选项。

我遵循了本教程:http://www.raywenderlich.com/62435/make-swipeable-table-view-cell-actions-without-going-nuts-scroll-views 半成功地完成了这项工作,但问题是这需要自动布局和操作约束以使 table 单元格可通过 UIPanGestureRecognizer.

有没有什么方法可以在不使用约束的情况下实现相同的用户体验?我对 UIPanGestureRecognizer 有点陌生,所以任何关于如何开始这个的建议都会很棒,或者如果有任何教程可以在不使用约束的情况下做同样的事情。

UIPanGestureRecognizer用于检测用户是否点击了屏幕Check this link

您正在使用 UITableView 那么您将不需要 UIPanGestureRecognizer 。尝试使用 AutoLayout 并成为家庭成员。

尝试查看以下表格视图教程Create a Simple Table View App , Customize Table View Cells for UITableView , How To Handle Row Selection in UITableView

如果您对自动布局有疑问,请提出来,我会尽力帮助您