sovata8 / revealingtableviewcell Goto Github PK
View Code? Open in Web Editor NEWRevealingTableViewCell is a UITableViewCell that can be swiped to reveal content underneath its main view
License: MIT License
RevealingTableViewCell is a UITableViewCell that can be swiped to reveal content underneath its main view
License: MIT License
The project must be updated to the new version of swift.
I used RevealingTableViewCell for swift 4 project and got only one error during build time:
Pods/RevealingTableViewCell/RevealingTableViewCell/RevealingTableViewCell.swift:158:75: Argument of '#selector' refers to instance method 'selector_panGesture' that is not exposed to Objective-C
By adding @objc
modifier to selector_panGesture
this error was fixed. So it is pretty easy to make this library support swift 4, let's do this!
How can we get the direction for the cell movement ?
Hi @sovata8 , my App needs iOS9 support, but because of this package I can set the Deployment target to lower then iOS10.
For this Module I already implemented:
@available(iOS 10, *)
// use RevealingTableViewCell things
But it's not working, because of this error:
Module file's minimum deployment target is ios10.0 v10.0
When the user starts dragging the cell's mainContent, any ongoing animations (e.g. a spring animation from an earlier interactions) continue to happen. They should all stop.
When opens the library on xCode 11 beta 4.0, appears a warning saying that needs to update to swift 4.
Any solution?
Thanks in advance!
With some AutoLayout setups (it seems especially with nested views and constraints), when the cell is being dragged sideways, the layout 'falls apart'. It does not return to normal. This surely has to do with how we temporary disable AutoLayout when the view is dragged. Look for clues here:
AutoLayoutTools.removeAllConstraints(inSuperview: self.contentView, relatingTo: self.uiView_mainContent)
self.constraintsToTemporaryDisable = self.uiView_mainContent.constraints
self.uiView_mainContent.removeConstraints(self.constraintsToTemporaryDisable)
You are using awakeFromNib
for logic, but that method is only called when a storyboard/xib is used. You should instead support cases where UI is built in code.
There are other issues with your code. You are adding a gesture recognizer to (terribly named) uiView_mainContent
, but the setter of that property is public. If the user replaces that view during runtime, your logic would be broken.
What is uiView_revealedContent_left
? Why not leftView
?
Same for the other names.
Do those names look like anything from UIKit to you? When creating frameworks to be used in iOS, you should strive to give similar patterns and naming conventions as Apple's iOS frameworks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.