1

I mean, not a UITabBarItem, an UIButton. For example, in the Deezer app, the middle button shows a view with an animation that covers the entire screen. I don't want the button to be rounded. Just to execute the action.

Toma
  • 2,764
  • 4
  • 25
  • 44

1 Answers1

1

This is a very simplistic example. You'll still have to modify it to fit your needs, but if you have a UIBarButtonItem called button that you've added to your navigationBar, you should be able to do something like this, in viewDidLoad

button.action = #selector(showView)

Then you just need to create a function to be called.

func showView() {
    let myView = UIView()
    self.view.addSubview(myView)
}

Of course this has no animations, but again this is just to point you in the right direction.

Benjamin Lowry
  • 3,730
  • 1
  • 23
  • 27