Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is UITableView separatorEffect property for?

New in iOS 8 is a separatorEffect property, to which you are allowed to assign a UIVisualEffect. Has anyone figured out what this is for? I've tried it and I don't see it as having any, uh, visual effect.

like image 639
matt Avatar asked Sep 29 '14 00:09

matt


People also ask

How do I remove a separator from a table view?

Add a Plain UIView to the Footer of the UITableView First, grab a plain UIView from the object browser, and drag it to the the footer position below all of your cell prototypes. It worked! The separator lines are gone.

What is separator inset?

The separatorInset property of UITableView is not new. It has been around since iOS 7 as a way to set the default inset for the separator between table view cells. It is a UIEdgeInsets but only the left and right values make any difference.


1 Answers

I was wondering the exact same thing so I put a Github project together for anyone facing the same issue.

The basic idea is that if your tableView's backgroundView consists of a UIVisualEffectView with a blur effect, then setting the seperatorEffect to a Vibrant Effect with the same blur as the UIVisualEffectView will produce the effect we see in Notification Center where the separators seem transparent.

Something like this:

tableView.separatorEffect = UIVibrancyEffect(forBlurEffect: blurredBackgroundView.blurView.effect as UIBlurEffect)

will produce a table view like this:

enter image description here

like image 187
Daniel Galasko Avatar answered Sep 21 '22 04:09

Daniel Galasko