MaterialActivityIndicator icon indicating copy to clipboard operation
MaterialActivityIndicator copied to clipboard

Support starting animation before being added to window

Open ayoy opened this issue 6 years ago • 0 comments

If the view is not on the screen (window == nil), defer adding animation to activity indicator until it gets added to window.

This patch allows to call startAnimating() while setting up the view, so that it starts animating immediately after going on-screen. Up until now, in order to take effect, startAnimating() had to be called when the view was already on-screen.

This is important in use cases when you create a view first, and then pass it on to the caller as a part of a view controller without exposing the activity indicator in VC's API (think showing a ready-made "waiting" dialog to the user).

ayoy avatar Jun 18 '19 15:06 ayoy