Files
NXKit/UIKitCore/lib/UIViewAnimationGroup.cpp
2025-02-24 23:03:13 +01:00

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);
}
}
}