manuelescrig / MEVFloatingButton

An iOS drop-in UITableView, UICollectionView and UIScrollView superclass category for showing a customizable floating button on top of it.
MIT License
297 stars 39 forks source link

Hide/remove button #7

Closed giacgbj closed 7 years ago

giacgbj commented 7 years ago

Is there a way to hide or remove the button?

manuelescrig commented 7 years ago

Setting buttton.displayMode = MEVFloatingButtonDisplayModeNone should make the trick.

giacgbj commented 7 years ago

It doesn't work.

The only workaround I created is to tag the button, let's say 42:

self.tableView.setFloatingButton(nil)
for view in self.tableView.subviews {
  if view.tag == 42 {
    view.removeFromSuperview()
  }
}

It would be nice to have that feature natively.