irace/BRYSerialAnimationQueue
关于
Perform UIView animations serially without blocking the main thread, using the same APIs you already know and love.
网站与应用开发实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文BRYSerialAnimationQueue
Perform UIView animations serially without blocking the main thread, using the same APIs you already know and love.
Installation
Via CocoaPods, of course:
pod "BRYSerialAnimationQueue"
Why?
The main goal of the class is to make it easy to perform event-based animations (e.g. a user taps a button or a network callback completes). One perfect example is displaying banners inside of an application when push notifications are received. Simply add animation blocks to a BRYSerialAnimationQueue instance and they'll be executed only once all of the previously queued animations have completed.
An added benefit is that nested animation code like this:
[UIView animateWithDuration:duration animations:^{
label.alpha = 1;
} completion:^(BOOL finished) {
[UIView animateWithDuration:duration delay:delay animations:^{
label.alpha = 0;
} completion:^(BOOL finished) {
[label removeFromSuperview];
}];
}];
Can be replaced with something a little cleaner, like:
BRYSerialAnimationQueue *queue = [[BRYSerialAnimationQueue alloc] init];
[queue animateWithDuration:duration animations:^{
label.alpha = 1;
}];
[queue animateWithDuration:duration delay:delay animations:^{
label.alpha = 0;
} completion:^(BOOL finished) {
[label removeFromSuperview];
}];
License
Available for use under the MIT license: http://bryan.mit-license.org
探索相关项目
加载中…