kciter / Floaty

:heart: Floating Action Button for iOS
MIT License
1.58k stars 310 forks source link

Fix crash issue on iPad for macOS and macCatalyst #307

Closed MainasuK closed 2 years ago

MainasuK commented 3 years ago

The TAB keep crash due to the buttonImageView = UIImageView(image: buttonImage) trigger draw(_:) so the app running in the infinite loop on the macOS.

Bring the buttonImageView reset code before setNeedsDisplay fix it. And iOS/iPadOS and macOS all works