New issue
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
The action is sometimes not shown #121
Comments
Are you overriding |
@kurabi No. The logic of the table is in a separate file with reference to the table object. //viewDidLoad displayManager = NotificationsDataDisplayManager(with: tableView) |
I am referring to the ‘prepareForReuse’ method on the the ‘UITableViewCell’ |
@kurabi I answered :) |
Are you using the latest version of the library? This issue was fixed in the last release |
@kurabi From Podfile.lock : - SwiftValidator (4.0.0) |
There is no such version |
@kurabi SwipeCellKit (2.0.0) |
Is it possible to share code that replicates this? Its likely clipsToBounds is being turned on by you, and hence it clips the action views. |
@kurabi Thanks, the problem was in clipsToBounds. |
You can implement what you need with a background image with cap insets |
@kurabi Could you explain your last message a little? |
I'll try to explain how you can achieve such a result with minimal changes to the library code:
func configureActionsView(with actions: [SwipeAction], for orientation: SwipeActionsOrientation) { let view = UIView()
view.backgroundColor = .orangeRed
view.layer.cornerRadius = layer.cornerRadius
view.translatesAutoresizingMaskIntoConstraints = false
insertSubview(view, belowSubview: contentView)
let insets = getSwipeInsets()
view.topAnchor.constraint(equalTo: topAnchor, constant: insets.top).isActive = true
view.leftAnchor.constraint(equalTo: leftAnchor, constant: insets.left).isActive = true
view.bottomAnchor.constraint(equalTo: bottomAnchor, constant: -insets.bottom).isActive = true
let right = NSLayoutConstraint(item: view, attribute: .right, relatedBy: .equal, toItem: self, attribute: .right, multiplier: 1.0, constant: -insets.right)
addConstraint(right)
rightConstraint = right
resizingView = view }
rightConstraint?.constant = fabs(target.frame.origin.x) - insets.right
let distance = offset - center.x
animator.addAnimations({
self.center = CGPoint(x: offset, y: self.center.y)
self.rightConstraint?.constant -= distance
self.layoutIfNeeded()
)} //... |
@SeRG1k17 Hi, I'm trying to change the background cell shape to conform to my custom rounded cell like you showed in the comment above. I'm having difficulties trying to implement it, however. Do you have any projects you wrote with this that I can see? |
Everything you need can be understood from gif.
This is somehow connected with re-use cell. The cell is loaded from .xib
The text was updated successfully, but these errors were encountered: