aFella
aFella

Reputation: 205

iOS 13 UIToolBar Style

I am trying to create a tool bar for the number pad I am using in swift, but am getting this warning with the following code:

'blackTranslucent' was deprecated in iOS 13.0: Use UIBarStyleBlack and set the translucent property to YES instead

I am not seeing any property of type UIBarStyleBlack with UIToolBar, how can I get rid of this warning?

let doneToolbar: UIToolbar = UIToolbar(frame: CGRect(x: 0, y: 0, width: 320, height: 50))
doneToolbar.barStyle = .blackTranslucent

Upvotes: 2

Views: 810

Answers (1)

Noah Iarrobino
Noah Iarrobino

Reputation: 1553

You can use doneToolbar.isTranslucent = true

Upvotes: 2

Related Questions