Eureka: removing separator

Created on 5 Jul 2016  路  5Comments  路  Source: xmartlabs/Eureka

hi
thanks for the great code, awesome work !

I can't manage to just hide separator on a LabelRow (for Example)
I'm in grouped tableview and tried to work with separatorInset,... but can't manage to do it

any ideas please ?

Stack Overflow

Most helpful comment

In case anyone in the future reads this, to hide all separators
in viewdidload
self.tableView?.separatorStyle = UITableViewCellSeparatorStyle.none

All 5 comments

Hi @juliensechaud
No row does manage the separators. This is a thing of UITableView and not directly Eureka related. Please post this questions on StackOverflow (tag: eureka-forms) or search that forums for answers.
Normally you hide separators changing the separatorStyle to .None of the tableView of your FormViewController.

thanks for the answer but I wanted to hide separators for specific cells
for info I did that

func hideGroupedSeparator() {
        for view in self.subviews where view != self.contentView {
            if String(view.dynamicType) == "_UITableViewCellSeparatorView" {
                view.removeFromSuperview()
            }
        }
    }

to call in the layoutSubviews of cells' classes

public override func layoutSubviews() {
        super.layoutSubviews()
        self.hideGroupedSeparator()
    }

Hi julien

Can you give more sample code and let see how you do this in Eureka?

In case anyone in the future reads this, to hide all separators
in viewdidload
self.tableView?.separatorStyle = UITableViewCellSeparatorStyle.none

Hiding a single separator of a UITableViewCell cell in Swift4:

for view in cell.subviews where view != cell.contentView {
  if String(describing: type(of: view)) == "_UITableViewCellSeparatorView" {
    view.removeFromSuperview()
  }
}
cell.layoutSubviews()
Was this page helpful?
0 / 5 - 0 ratings

Related issues

s1rc picture s1rc  路  3Comments

allanrojas picture allanrojas  路  3Comments

annjawn picture annjawn  路  3Comments

jaylyerly picture jaylyerly  路  3Comments

JonathanImperato picture JonathanImperato  路  3Comments