Gradientable icon indicating copy to clipboard operation
Gradientable copied to clipboard

Button split after rotation

Open camilajenny opened this issue 7 years ago • 2 comments

If you create a gradientable button: screen shot 2017-11-08 at 11 37 36 and you rotate view left or right and then rotate then back, the gradient splits from the button: screen shot 2017-11-08 at 11 35 49

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.

camilajenny avatar Nov 08 '17 10:11 camilajenny

The problem can be avoided by embedding the button in a view.

camilajenny avatar Nov 08 '17 10:11 camilajenny

@banan314 Hi, Can you upload a test project or code? When I tested it, that it worked normally.

simulator screen shot - iphone 8 - 2017-11-09 at 17 31 30 simulator screen shot - iphone 8 - 2017-11-09 at 17 32 11

Kofktu avatar Nov 09 '17 08:11 Kofktu