Gradientable
Gradientable copied to clipboard
Button split after rotation
If you create a gradientable button:
and you rotate view left or right and then rotate then back, the gradient splits from the button:
The definition of outlet:
@IBOutlet weak var backButton: GradientableButton!
The setup:
backButton.setupGradientable()
backButton.set(options: GradientableOptions(colors: [.yellow, .cyan]))
backButton.set(animation: GradientableAnimation(to: [.yellow, .cyan], duration: 10.0))
button.layer.cornerRadius = 5
button.clipsToBounds = true
Tested in XCode 9.0.1.
The problem can be avoided by embedding the button in a view.
@banan314 Hi, Can you upload a test project or code? When I tested it, that it worked normally.