<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 - 1.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIStoryboardSegue/perform()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIStoryboardSegue(im)perform"
  },
  "title" : "perform()"
}
-->

# perform()

Performs the visual transition for the segue.

```
func perform()
```

## Discussion

Subclasses override this method and use it to perform the animations from the views in [`source`](/documentation/UIKit/UIStoryboardSegue/source) to the views in [`destination`](/documentation/UIKit/UIStoryboardSegue/destination). Typically, you use UIKit or Core Animation to set up an animation from one set of views to the next. For more complex animations, you might take a snapshot image of the two view hierarchies and manipulate the images instead of the actual view objects.

Regardless of how you perform the animation, at the end of it, you’re responsible for installing the destination view controller (and its views) in the right place so that it can handle events. For example, if you were to implement a custom modal transition, you might perform your animations using snapshot images and then at the end call the [`presentModalViewController:animated:`](/documentation/UIKit/UIViewController/presentModalViewController:animated:) method (with animations disabled) to set up the appropriate modal relationship between the source and destination view controllers.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)