mirror of
https://github.com/XITRIX/NXKit.git
synced 2026-05-30 11:46:52 +00:00
20 lines
474 B
C++
20 lines
474 B
C++
#include <UIViewAnimationGroup.h>
|
|
|
|
#include <utility>
|
|
|
|
namespace NXKit {
|
|
|
|
UIViewAnimationGroup::UIViewAnimationGroup(UIViewAnimationOptions options, std::optional<std::function<void(bool)>> completion):
|
|
options(options), completion(std::move(completion))
|
|
{ }
|
|
|
|
void UIViewAnimationGroup::animationDidStop(bool finished) {
|
|
queuedAnimations -= 1;
|
|
if (queuedAnimations == 0) {
|
|
if (completion.has_value())
|
|
completion.value()(finished);
|
|
}
|
|
}
|
|
|
|
}
|