jjochen / JJFloatingActionButton

Floating Action Button for iOS
https://jjochen.github.io/JJFloatingActionButton
MIT License
376 stars 75 forks source link

How change default green color to system blue? #267

Closed rayastar closed 4 years ago

rayastar commented 4 years ago

How change default green color to system blue? code below doesn't work:

let imageView = UIImage(named: "random-20") imageView?.withTintColor(UIColor.systemBlue)

    actionButton.addItem(title: "title", image: imageView!.withRenderingMode(.alwaysTemplate)) { item in
      // do something
    }
jjochen commented 4 years ago

You can set buttonColor like so

actionButton.buttonColor = .red

See here for a full example.