Я пытаюсь реализовать SUBJ, но не могу сделать выделение segue в моей анимации. Я хочу сделать анимацию для изменения вида, где новый segue вытеснит старый. В настоящее время мой метод выполнения выглядит следующим образом:Перемещение одного вида с другим с помощью специальной анимации segue?
- (void) perform {
UIViewController *src = (UIViewController *) self.sourceViewController;
UIViewController *dst = (UIViewController *) self.destinationViewController;
[UIView animateWithDuration:2.0
animations:^{
//tried a lot of staff to make dst view to fall from top at the same time as current view falling to bottom but failed.
src.view.transform=CGAffineTransformMakeTranslation(0, 480);
}
completion:^(BOOL finished){
[[self sourceViewController] presentModalViewController:[self destinationViewController] animated:NO];
}
];
}
Любые идеи, как я могу добавить к моей анимации блок новый взгляд появляющегося сверху?
Большое спасибо!
EDIT:
- (void) perform {
UIViewController *src = (UIViewController *) self.sourceViewController;
UIViewController *dst = (UIViewController *) self.destinationViewController;
src.view.transform = CGAffineTransformMakeTranslation(0, 0);
dst.view.transform = CGAffineTransformMakeTranslation(0, -480);
[UIView animateWithDuration:2.0
animations:^{
[src.view addSubview:dst.view];
src.view.transform = CGAffineTransformMakeTranslation(0, 460);
}
completion:^(BOOL finished){
[src presentModalViewController:dst animated:NO];
}
];
}
Вот как я сделал это в конце концов.
все просто! ... http://stackoverflow.com/a/25482006/294884 – Fattie