Search code examples
iosswifteureka-forms

Eureka Forms: How to change form global tint colour


I am using Eureka to implement a simple form in my project. The form seems to have blue tint in the tint bar buttons above the keyboard and I am unsure how to change it.

enter image description here

Is there a way to make the "Done" label green like the rest of my UI?


Solution

  • Updated Eureka 4.3.x

    You should override a variable customNavigationAccessoryView in your controller

    override var customNavigationAccessoryView: (UIView & NavigationAccessory)? {
        // The width might not be correctly defined yet: (Normally you can use UIScreen.main.bounds)
        let navView = NavigationAccessoryView(frame: CGRect(x: 0, y: 0, width: view.frame.width, height: 44.0))
        navView.barTintColor = UIColor.MaterialColors.category3
        navView.tintColor = UIColor.white
        return navView
    }
    

    Here you go and fix the colour of Done Label. override NaviagtionAccessoryView Instance as navigationAccessoryView below

    navigationAccessoryView.tintColor = "Your Colour"
    navigationAccessoryView.backgroundColor = "Your Colour"
    navigationAccessoryView.doneButton.tintColor = "Your Colour"
    

    More Here