Skip to content

Commit

Permalink
Update configuration example in README and example project (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjochen committed Sep 9, 2019
1 parent 962706b commit b9c4063
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ internal class ConfigurationExampleViewController: UIViewController {
}

fileprivate func configureActionButton() {
actionButton.handleSingleActionDirectly = false
actionButton.buttonDiameter = 65
actionButton.overlayView.backgroundColor = UIColor(hue: 0.31, saturation: 0.37, brightness: 0.10, alpha: 0.30)
actionButton.buttonImage = #imageLiteral(resourceName: "Dots")
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,13 @@ actionButton.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnc
Button appearance and behavior can be customized:

```swift
actionButton.handleSingleActionDirectly = false
actionButton.buttonDiameter = 65
actionButton.overlayView.backgroundColor = UIColor(white: 0, alpha: 0.3)
actionButton.buttonImage = UIImage(named: "Dots")
actionButton.buttonColor = .red
actionButton.buttonImageColor = .white
actionButton.buttonImageSize = CGSize(width: 30, height: 30)

actionButton.buttonAnimationConfiguration = .transition(toImage: UIImage(named: "X"))
actionButton.itemAnimationConfiguration = .slideIn(withInterItemSpacing: 14)
Expand Down Expand Up @@ -154,6 +157,7 @@ item.titleLabel.text = "Owl"
item.imageView.image = UIImage(named: "Owl")
item.buttonColor = .black
item.buttonImageColor = .white
item.buttonImageColor = CGSize(width: 30, height: 30)
item.action = { item in
// Do something
}
Expand Down

0 comments on commit b9c4063

Please sign in to comment.