Comments (7)
I think I'll need to tinker with var actionsView: SwipeActionsView?
from the SwipeTableViewCell
from swipecellkit.
Hello,
SwipeActionsView.swift file
implement like below lines...
func addButtons(for actions: [SwipeAction], withMaximum size: CGSize) {
subviews.forEach { $0.removeFromSuperview() }
for action in actions {
let actionButton = SwipeActionButton(frame: CGRect(origin: CGPoint(x: 0, y: size.height/2-30), size: CGSize(width: size.width * 2, height: 60)), action: action)
addSubview(actionButton)
actionButton.addTarget(self, action: #selector(actionTapped(button:)), for: .touchUpInside)
minimumButtonWidth = max(minimumButtonWidth, actionButton.preferredWidth)
switch self.orientation {
case .left:
let maskPAth1 = UIBezierPath(roundedRect: actionButton.bounds,
byRoundingCorners: [.topRight , .bottomRight],
cornerRadii:CGSize(width: 30, height: 30))
let maskLayer1 = CAShapeLayer()
maskLayer1.frame = actionButton.bounds
maskLayer1.path = maskPAth1.cgPath
actionButton.layer.mask = maskLayer1
case .right:
let maskPAth1 = UIBezierPath(roundedRect: actionButton.bounds,
byRoundingCorners: [.topLeft , .bottomLeft],
cornerRadii:CGSize(width: 30, height: 30))
let maskLayer1 = CAShapeLayer()
maskLayer1.frame = actionButton.bounds
maskLayer1.path = maskPAth1.cgPath
actionButton.layer.mask = maskLayer1
}
}
}
from swipecellkit.
Well I wanted a clean way of accessing the view from my controller, not to tinker with SwipeCellKit code.
That's what I did eventually. Modified the actionView 'cuz that's what I needed.
from swipecellkit.
Hey @alexbuga - Good to hear you managed to get it working. Any chance you can share a sample project?
I've haven't had a chance think about the best way of accommodating this... maybe it's as simple as exposing the SwipeActionsView
. Since the actionView
extends outside of the cell bounds, I'm not clear how you got the rounded corners all around.
from swipecellkit.
from swipecellkit.
This work is not in scope for now but I will welcome pull requests to support something like this.
from swipecellkit.
@alexbuga
I want to talk to you about how to do this round in this ActionButton plz !
from swipecellkit.
Related Issues (20)
- Left swipe evoke (almost always) right swipe behavior HOT 1
- Does SwipeCellKit support CollectionView with multiple column?
- When there is only one button on the right, or there are multiple buttons, clicking the rightmost button will crash HOT 1
- cell is not moving when swipe HOT 4
- version 2.7.1: didSelect method is not called, when cell is tapped.
- Instant interface jitter HOT 1
- Why SwipeController's actionsContainerView uses self in TableView and slef.contentView in CollectionView?
- Not able to place Buttons vertically
- Does this library support MacOS?
- Swipe to delete without SwipeAction HOT 1
- Open swipe options on click on cell HOT 4
- swipe cancel seems to be causing crash
- SwipeOptions not hiding when swiped back HOT 1
- Swipe animation gesture broken
- How can I get Pan Gesture call, when it was ended and cell was untouched ?
- IGListKit & SwipeCellKit HOT 1
- UIScreenEdgePanGestureRecognizer invalid
- Custom Button Cell HOT 3
- Swipe row mismatch
- Is there a way to always auto-close the menu when dragging stops?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swipecellkit.