We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can this be added as a TableViewCell? If so can you add an example to do that? I am not able to make it work
This is my TableViewCell
// // SwipeableCardTableViewCell.swift // Hunbun // // Created by noor on 05/01/24. // import UIKit import ZLSwipeableViewSwift class SwipeableCardTableViewCell: UITableViewCell { var swipeableView: ZLSwipeableView! override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { super.init(style: style, reuseIdentifier: reuseIdentifier) setup() } required init?(coder: NSCoder) { super.init(coder: coder) setup() } func setup() { backgroundColor = .clear contentView.backgroundColor = .clear configureSwipeableView() layoutSwipeableView() } func configureSwipeableView() { swipeableView = ZLSwipeableView() swipeableView.translatesAutoresizingMaskIntoConstraints = false contentView.addSubview(swipeableView) swipeableView.didStart = { _, _ in print("Did start swiping view") } swipeableView.nextView = { [weak self] in return self?.nextCardView() } swipeableView.didEnd = { _, location in print("Did end swiping view at location: \(location)") } swipeableView.didSwipe = { _, direction, vector in print("Did swipe view in direction: \(direction), vector: \(vector)") } swipeableView.didCancel = { _ in print("Did cancel swiping view") } swipeableView.didTap = { _, location in print("Did tap at location \(location)") } swipeableView.didDisappear = { _ in print("Did disappear swiping view") } } func layoutSwipeableView() { swipeableView.anchor(top:contentView.topAnchor, left: contentView.leftAnchor, bottom: contentView.bottomAnchor, right: contentView.rightAnchor) } func nextCardView() -> UIView? { // Implement your logic to create the next card view // Example: let cardView = UIView(frame: swipeableView.bounds) cardView.backgroundColor = .blue return cardView } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Can this be added as a TableViewCell? If so can you add an example to do that? I am not able to make it work
This is my TableViewCell
The text was updated successfully, but these errors were encountered: