PresentModalViewController without storyboard-style animation

I have an existing iPhone application built using traditional nib interface files. Now I'm going to convert the application to iOS5 style interfaces. I changed almost all the interface files and worked fine.

But I came up with a little problem. My Exsiting application has code for presentModalViewController:animated: without animation. This is by setting NO to the animated property. I have a problem with the same success. I cannot find any attribute to disable animation in segues.

+4
source share
1 answer

I solve the problem above using custom segue. I created a custom segue by extending the UIStoryboardSegue class and adding code to the presentModalViewController without animation. Here is a solution to the above question.

 #import "ModalViewWithoutAnimation.h" @implementation ModalViewWithoutAnimation - (void)perform { [self.sourceViewController presentModalViewController:self.destinationViewController animated:NO]; } @end 

thanks

+10
source

Source: https://habr.com/ru/post/1385475/


All Articles