Я слежу за некоторыми учебниками для создания пользовательской анимации при переходе от одного представления к другому.
Мой тестовый проект с использованием пользовательского segue из здесь работает отлично, но кто-то сказал мне, что он больше не поощряется делать пользовательскую анимацию в пользовательском сегменте, и я должен использовать UIViewControllerAnimatedTransitioning
.
Я следил за несколькими учебниками, которые используют этот протокол, но все они касаются модальной презентации (например, этот учебник).
То, что я пытаюсь сделать, это нажать сегу в дереве контроллера навигации, но когда я пытаюсь сделать то же самое с show (push) segue, он больше не работает.
Скажите, пожалуйста, правильный способ сделать пользовательскую переходную анимацию из одного представления в другое в навигационном контроллере.
И все-таки я могу использовать один метод для всех переходных анимаций? Было бы неудобно, если в один прекрасный день я захочу сделать одну и ту же анимацию, но в итоге мне придется дважды дублировать код, чтобы работать на переход от modal vs controller.