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
CodePudding user response:
You can use doneToolbar.isTranslucent = true