benim girdim
Ben
Sadece şu anda ayarlanmış tek süresini ve seçeneğini destekler here! mevcut aşamalı animasyon işlemek için bir sınıf yarattı, ama muhtemelen daha özellikler ekleyeceğiz. İşte
Kullanmaya nasıl:
// Create New Animation
MSAnimation * newAnimation = [MSAnimation newAnimationWithDuration:0.35 andOptions:UIViewAnimationOptionCurveEaseInOut];
// Add Sequence
[newAnimation addNewAnimationStage:^{
greenView.center = CGPointMake(greenView.center.x, greenView.center.y + 100);
}];
[newAnimation addNewAnimationStage:^{
greenView.center = CGPointMake(greenView.center.x + 100, greenView.center.y);
}];
[newAnimation addNewAnimationStage:^{
greenView.center = CGPointMake(greenView.center.x, greenView.center.y + 100);
}];
[newAnimation addNewAnimationStage:^{
greenView.center = CGPointMake(greenView.center.x - 50, greenView.center.y);
}];
[newAnimation addNewAnimationStage:^{
greenView.frame = CGRectMake(0, 0, 100, 100);
}];
// Animate Your Sequence With Completion
[newAnimation animateSequenceWithCompletion:^{
NSLog(@"All finished!");
}];
size verir:
Çok aşamalı animasyon gerçekten UIKit bir eksik tasarım özelliğidir. Bazılarını QuartzCore kullanarak alabilirsin, ama fazla değil. Birisi gelecek dönemde daha iyi bir çözüm bulmalı. –