0

I can manage to remove an image

def remove_image
    @button_image.removeFromSuperview
end

But what script works in order to remove a button?

1 Answers1

0

A button is a subclass of a UIView so you can remove it the same way:

@button.removeFromSuperview

Alternatively, you can just hide the button:

@button.hidden = true
vacawama
  • 150,663
  • 30
  • 266
  • 294