swiftxcodeswift3iqkeyboardmanager

Swift 3 / IQKeyboardManager : How do you change background color of toolbar , done color, arrow colors?


How do you change background color of toolbar , done color, arrow colors, and hide the text title on the toolbar in the middle?


Solution

  • You can change the appearance of Next/Previous(arrow) and Done buttons color by setting tintColor of the toolbar using below code.

    To change arrow and done button colors to red:

    IQKeyboardManager.shared.toolbarTintColor = .red
    

    To hide text title on the toolbar in the middle

    IQKeyboardManager.shared.shouldShowToolbarPlaceholder = false
    

    I haven't find any property to change bar color but can change background color of IQToolbar class itself. If you find any, then add here for other's reference.