Comments (4)
Hi ArtworkAD!
Because BFPaperTableViewCells do their own background highlighting, in their constructor I purposely set their selectionStyle
to UITableViewCellSelectionStyleNone
which is causing the behavior you describe.
If you are ok with the highlight looking a bit different, you can set
cell.selectionStyle = UITableViewCellSelectionStyleDefault;
in cellForRowAtIndexPath, or wherever you setup your cells, to bring back this behavior (similar to the Settings app).
If you are talking about adding a feature to BFPaperTableViewCell so that it's background fade remains upon selection and goes away on deselection, well I never thought of this. I'm not technically selecting or highlighting the cell, just drawing a layer on it. Also, cell selection is often handled by the tableView, not the cell itself.
However you have sparked my interest; I suppose I could override setSelected
, setHighlighted
, and prepareForReuse
to imitate this kind of effect.
I'll let you know if I get this working nicely.
from bfpapertableviewcell.
Thank you for this great explanation. I think UITableViewCellSelectionStyleDefault
will be ok for me.
from bfpapertableviewcell.
Hello again,
I've pushed version 1.3.0 which now has two new properties:
CGFloat backgroundFadeAlpha
&
BOOL letBackgroundLinger
(default YES).
Also now you no longer need to set cell.selectionStyle = UITableViewCellSelectionStyleDefault;
because the background will linger until the cell is de-selected. You should find that it behaves just like the standard UITableViewCell in a standard UITableViewController.
Please let me know if you find any bugs. Thanks for suggesting this feature!
from bfpapertableviewcell.
@bfeher this is awesome, thank you 👍
from bfpapertableviewcell.
Related Issues (12)
- Enhancement: Move tab circle with finger HOT 2
- Remove NSLog statement in line 371 HOT 2
- Bug: v1.3.0 coloring removed when using UISearchBar HOT 3
- Bug: v1.3.0, app crashes on fast table scroll HOT 3
- BOOL letBackgroundLinger doesn't work HOT 3
- [Improvement] The view should complete the fade in and growth animations before fading out. HOT 16
- Bug in cell animation HOT 2
- Rounded corners on table cell HOT 20
- Issues drawing a custom border HOT 5
- Content-view has subView won't work wave effect HOT 1
- Warning: assigning incompatible type HOT 3
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 bfpapertableviewcell.