4

How do i perform unwind segue without any animation. I tried setting up a unwind segue and in the storyboard on the right side unchecking "Animates" but its still animated(it slides down), how can i fix that?

Rashwan L
  • 35,847
  • 7
  • 90
  • 97
  • As noted below, unchecking Animates as you done should be sufficient to disable animation. Can you provide more information about your setup, maybe attach a sample project that demonstrates the issue? – Jordan H Dec 27 '15 at 19:36
  • I can confirm that the Animates checkbox produces the expected behavior (I just tried it in my own project). There must be something going on in your code which has not been brought out by your question. – Verticon Dec 27 '15 at 19:42

1 Answers1

6

Using Xcode 7, running on an iOS Simulator, this works as expected. Simply unchecking "Animates" on the unwind segue in Interface Builder in the Attributes Inspector will cause the modally presented view controller(s) to instantly disappear instead of animate down off screen.

Do note that this behavior is new in iOS 9. For iOS 8, it will still animate the unwind dismissal. Thanks to Dave G for noting this.

warning in Xcode stating unwind segue animation is not avaialbe prior to iOS 9.0

I've attached a sample project that demonstrates how this is working, which you can compare to your project to determine where the difference lies.

Sample Project

animated gif

Jordan H
  • 45,794
  • 29
  • 162
  • 306
  • According to the project I tried this for, the "animates" checkbox for unwind segues will only work for iOS9 and later. Unchecking "animates" for Show also requires iOS9. You can, oddly, uncheck it for modal segues. – Dave G Jan 05 '16 at 14:04
  • Thanks @DaveG, I can confirm this as well. I will update the answer. – Jordan H Jan 05 '16 at 16:23
  • I am using iOS 10 and it works once in a while but is not consistent. Any new solutions? – Coder221 Jun 03 '18 at 06:34