{"id":66,"date":"2016-11-05T21:19:00","date_gmt":"2016-11-05T21:19:00","guid":{"rendered":"https:\/\/seimith.io\/?p=66"},"modified":"2024-07-20T00:36:30","modified_gmt":"2024-07-20T00:36:30","slug":"swift-custom-segue","status":"publish","type":"post","link":"https:\/\/seimith.io\/pt\/2016\/11\/05\/swift-custom-segue\/","title":{"rendered":"(Swift) Custom Segue"},"content":{"rendered":"<p>This tutorial will demonstrate how to add a custom segue to your Swift app.<\/p>\n\n\n\n<p>There are a few generic segues that are available to use in Xcode, however, you might be in a situation where you need specific transitions that might be better suited for gestures.<\/p>\n\n\n\n<p>In this case, the animation in play will be a sliding one (great for swiping).<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/seimith\/seimith.github.io\/master\/_assets\/2016-11-05-assets\/CustomSegue.gif\" alt=\"&quot;Custom segue&quot;\" title=\"Custom segue\"\/><\/figure>\n\n\n\n<p><strong>Tools:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Swift 3.0<\/li>\n\n\n\n<li>Xcode Version 8.1<\/li>\n<\/ul>\n\n\n\n<p><strong>Step 1: Create swift project<\/strong>&nbsp;Create a \u201cSingle View Application\u201d project. If you don\u2019t want extra folders in your project for testing, make sure you uncheck the items for tests.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/determined-mcnulty-44b4a3.netlify.app\/static\/c5b4944fa1f97876e7a3e9bc3bfea77b\/f058b\/1.png\" alt=\"&quot;Creating a single page application&quot;\" title=\"Creating a single page application\"\/><\/figure>\n\n\n\n<p><a href=\"https:\/\/determined-mcnulty-44b4a3.netlify.app\/static\/c5b4944fa1f97876e7a3e9bc3bfea77b\/669cd\/1.png\" target=\"_blank\" rel=\"noreferrer noopener\"><\/a><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/determined-mcnulty-44b4a3.netlify.app\/static\/c4faa4fa0e8fe627094c196be2d0396f\/f058b\/2.png\" alt=\"&quot;Creating a single page application&quot;\" title=\"Creating a single page application\"\/><\/figure>\n\n\n\n<p><a href=\"https:\/\/determined-mcnulty-44b4a3.netlify.app\/static\/c4faa4fa0e8fe627094c196be2d0396f\/669cd\/2.png\" target=\"_blank\" rel=\"noreferrer noopener\"><\/a><\/p>\n\n\n\n<p><strong>Step 2: Create your segue<\/strong>&nbsp;I made a bit of a mistake here in naming my class with lowercase, \u201cfirstCustomSegue\u201d. However, this example works just find.<\/p>\n\n\n\n<p>Make sure to select&nbsp;<code>UIStoryboardSegue<\/code>&nbsp;as the subclass and Swift as the language.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/determined-mcnulty-44b4a3.netlify.app\/static\/221091974a91c49e4863ad24208ec19b\/f058b\/3.png\" alt=\"&quot;Creating a new file for your segue&quot;\" title=\"Creating a new file for your segue\"\/><\/figure>\n\n\n\n<p><a href=\"https:\/\/determined-mcnulty-44b4a3.netlify.app\/static\/221091974a91c49e4863ad24208ec19b\/669cd\/3.png\" target=\"_blank\" rel=\"noreferrer noopener\"><\/a><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/determined-mcnulty-44b4a3.netlify.app\/static\/a38d77b3ac3061c3c68bd262c22f398b\/f058b\/4.png\" alt=\"&quot;Naming your segue file&quot;\" title=\"Naming your segue file\"\/><\/figure>\n\n\n\n<p><a href=\"https:\/\/determined-mcnulty-44b4a3.netlify.app\/static\/a38d77b3ac3061c3c68bd262c22f398b\/be061\/4.png\" target=\"_blank\" rel=\"noreferrer noopener\"><\/a><\/p>\n\n\n\n<p>The following is the code + comments for the custom segue explaining each section.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import UIKit\n\nclass firstCustomSegue: UIStoryboardSegue {\n    override func perform() {\n        \/\/ Declare the INITAL view and the DESTINATION view\n        \/\/ This will break and be nil if you don't have a second view controller for your DESTINATION view\n        let initalView = self.source.view as UIView!\n        let destinationView = self.destination.view as UIView!\n\n        \/\/ Specify the screen HEIGHT and WIDTH\n        let screenHeight = UIScreen.main.bounds.size.height\n        let screenWidth = UIScreen.main.bounds.size.width\n\n        \/\/ Specify the INITIAL PLACEMENT of the DESTINATION view\n        initalView?.frame = CGRect(x: 0, y: 0, width: screenWidth, height: screenHeight)\n        destinationView?.frame = CGRect(x: screenWidth, y: 0, width: screenWidth, height: screenHeight)\n\n        \/\/ Access the app's key window and add the DESTINATION view ABOVE the INITAL view\n        let appWindow = UIApplication.shared.keyWindow\n        appWindow?.insertSubview(destinationView!, aboveSubview: initalView!)\n\n        \/\/ Animate the segue's transition\n        UIView.animate(withDuration: 0.4, animations: {\n            \/\/ Left\/Right\n            initalView?.frame = (initalView?.frame.offsetBy(dx: -screenWidth, dy: 0))!\n            destinationView?.frame = (destinationView?.frame.offsetBy(dx: -screenWidth, dy: 0))!\n        }) { (Bool) in\n            self.source.present(self.destination, animated: false, completion: nil)\n        }\n    }\n}\n<\/code><\/pre>\n\n\n\n<p><strong>Step 3: Create a second view controller<\/strong>&nbsp;When you initially create your Swift app, you get a boilerplate set of files. One of them is the&nbsp;<code>ViewController.swift<\/code>. We\u2019re going to use this view controller, but in addition to this view controller we need to create another view controller for another view that we also need to make.&nbsp;<code>:-} in next step<\/code><\/p>\n\n\n\n<p>In this case, the new view controller that I\u2019ve created here is called&nbsp;<code>SecondViewController<\/code>.<\/p>\n\n\n\n<p>Make sure to update the subclass to&nbsp;<code>UIViewController<\/code>.<\/p>\n\n\n\n<p>You don\u2019t need to add anything in the second view controller.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/determined-mcnulty-44b4a3.netlify.app\/static\/bdd1a658be23ae1813bca4928477b4ff\/f058b\/5.png\" alt=\"&quot;Creating a new view controller&quot;\" title=\"Creating a new view controller\"\/><\/figure>\n\n\n\n<p><a href=\"https:\/\/determined-mcnulty-44b4a3.netlify.app\/static\/bdd1a658be23ae1813bca4928477b4ff\/d0180\/5.png\" target=\"_blank\" rel=\"noreferrer noopener\"><\/a><\/p>\n\n\n\n<p><strong>Step 4: Add a second UIView controller to the storyboard<\/strong>&nbsp;Now that I\u2019ve created a second view controller I need to add a new view controller.<\/p>\n\n\n\n<p>This can be done via the&nbsp;<code>Main.storyboard<\/code>&nbsp;and by searching for&nbsp;<code>View Controller<\/code>&nbsp;and dragging it onto the board.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/determined-mcnulty-44b4a3.netlify.app\/static\/763d706d15d13f862bbc37418b12c0d4\/f058b\/6.png\" alt=\"&quot;Adding a second UIView controller&quot;\" title=\"Adding a second UIView controller\"\/><\/figure>\n\n\n\n<p><a href=\"https:\/\/determined-mcnulty-44b4a3.netlify.app\/static\/763d706d15d13f862bbc37418b12c0d4\/be061\/6.png\" target=\"_blank\" rel=\"noreferrer noopener\"><\/a><\/p>\n\n\n\n<p>Once you do that you need to reassign the view controller \u201ccontrolling\u201d that new view.<\/p>\n\n\n\n<p>Make sure you update the class to the&nbsp;<code>SecondViewController<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/determined-mcnulty-44b4a3.netlify.app\/static\/fd7f14e7282c63b7de49690ed446e97a\/69902\/13.png\" alt=\"&quot;Reassigning the controller for the new UIView controller&quot;\" title=\"Reassigning the controller for the new UIView controller\"\/><\/figure>\n\n\n\n<p><a href=\"https:\/\/determined-mcnulty-44b4a3.netlify.app\/static\/fd7f14e7282c63b7de49690ed446e97a\/69902\/13.png\" target=\"_blank\" rel=\"noreferrer noopener\"><\/a><\/p>\n\n\n\n<p><strong>Step 5: Differentiating the scenes, adding a button and its constraints<\/strong>&nbsp;Here, I\u2019ve added different background colors to my views so I can visually differentiate the two scenes that I want to segue between.<\/p>\n\n\n\n<p>I\u2019ve also added a button such that I can use it to trigger my custom segue. You can totally add gesture recognizers here, but that\u2019s for another time.&nbsp;<code>:)<\/code><\/p>\n\n\n\n<p>In terms of constraints, I\u2019ve added a total of 4 constraints to my button:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Height<\/li>\n\n\n\n<li>Width<\/li>\n\n\n\n<li>Horizontally in Container<\/li>\n\n\n\n<li>Vertically in Container<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/determined-mcnulty-44b4a3.netlify.app\/static\/f11be9185acd885d32550fdc05359bf4\/f058b\/7.png\" alt=\"&quot;Adding constraints: height, width&quot;\" title=\"Adding constraints: height, width\"\/><\/figure>\n\n\n\n<p><a href=\"https:\/\/determined-mcnulty-44b4a3.netlify.app\/static\/f11be9185acd885d32550fdc05359bf4\/be061\/7.png\" target=\"_blank\" rel=\"noreferrer noopener\"><\/a><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/determined-mcnulty-44b4a3.netlify.app\/static\/f0c34378e746aed8232ba260e75869b9\/f058b\/8.png\" alt=\"&quot;Adding constraints: horizontal, vertical&quot;\" title=\"Adding constraints: horizontal, vertical\"\/><\/figure>\n\n\n\n<p><a href=\"https:\/\/determined-mcnulty-44b4a3.netlify.app\/static\/f0c34378e746aed8232ba260e75869b9\/be061\/8.png\" target=\"_blank\" rel=\"noreferrer noopener\"><\/a><\/p>\n\n\n\n<p><strong>Step 6: Setting the custom segue<\/strong>&nbsp;This is where you finally add the segue.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/determined-mcnulty-44b4a3.netlify.app\/static\/b0329641543ce7aec82b5e4e3d4c1cb2\/f058b\/9.png\" alt=\"&quot;Setting the custom segue&quot;\" title=\"Setting the custom segue\"\/><\/figure>\n\n\n\n<p><a href=\"https:\/\/determined-mcnulty-44b4a3.netlify.app\/static\/b0329641543ce7aec82b5e4e3d4c1cb2\/a2b91\/9.png\" target=\"_blank\" rel=\"noreferrer noopener\"><\/a><\/p>\n\n\n\n<p>On a Mac,&nbsp;<code>control + click + drag<\/code>, from the button to the second view controller and you will get&nbsp;<code>Action Segue<\/code>&nbsp;selections.<\/p>\n\n\n\n<p>Select&nbsp;<code>Custom<\/code>. (Although I see my custom segue class name in the list,&nbsp;<code>first custom<\/code>, selecting this has not worked for me.)<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/determined-mcnulty-44b4a3.netlify.app\/static\/614d830b4c2cba8921e07277837cafb3\/e33ef\/11.png\" alt=\"&quot;Selecting your custom segue&quot;\" title=\"Selecting your custom segue\"\/><\/figure>\n\n\n\n<p><a href=\"https:\/\/determined-mcnulty-44b4a3.netlify.app\/static\/614d830b4c2cba8921e07277837cafb3\/e33ef\/11.png\" target=\"_blank\" rel=\"noreferrer noopener\"><\/a><\/p>\n\n\n\n<p>Now, click on the segue representation on the storyboard (the thing with the bracket icon connecting the two view controllers) and remember to update the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Identifier<\/li>\n\n\n\n<li>Class<\/li>\n\n\n\n<li>Kind (should already be\u00a0<code>Custom<\/code>)<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/determined-mcnulty-44b4a3.netlify.app\/static\/8525b8836f660db3925512087084025c\/f058b\/12.png\" alt=\"&quot;Updating segue&quot;\" title=\"Updating segue\"\/><\/figure>\n\n\n\n<p><a href=\"https:\/\/determined-mcnulty-44b4a3.netlify.app\/static\/8525b8836f660db3925512087084025c\/be061\/12.png\" target=\"_blank\" rel=\"noreferrer noopener\"><\/a><\/p>\n\n\n\n<p>And that should be it. When you load your simulator you should be able to segue by \u201csliding\u201d between two scenes!<\/p>\n\n\n\n<p><strong>You can get the storyboard project is in&nbsp;<a href=\"https:\/\/github.com\/seimith\/SwiftCustomSegues\">this repo<\/a>.<\/strong><\/p>","protected":false},"excerpt":{"rendered":"<p>This tutorial will demonstrate how to add a custom segue to your Swift app. There are a few generic segues that are available to use in Xcode, however, you might be in a situation where you need specific transitions that might be better suited for gestures. In this case, the animation in play will be [&hellip;]<\/p>","protected":false},"author":1,"featured_media":293,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[20],"class_list":["post-66","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-post","tag-code"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>(Swift) Custom Segue - S(ei)mith.io<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/seimith.io\/pt\/2016\/11\/05\/swift-custom-segue\/\" \/>\n<meta property=\"og:locale\" content=\"pt_BR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"(Swift) Custom Segue - S(ei)mith.io\" \/>\n<meta property=\"og:description\" content=\"This tutorial will demonstrate how to add a custom segue to your Swift app. There are a few generic segues that are available to use in Xcode, however, you might be in a situation where you need specific transitions that might be better suited for gestures. In this case, the animation in play will be [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/seimith.io\/pt\/2016\/11\/05\/swift-custom-segue\/\" \/>\n<meta property=\"og:site_name\" content=\"S(ei)mith.io\" \/>\n<meta property=\"article:published_time\" content=\"2016-11-05T21:19:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-07-20T00:36:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/seimith.io\/wp-content\/uploads\/2016\/11\/1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"630\" \/>\n\t<meta property=\"og:image:height\" content=\"446\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Smith\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Smith\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/seimith.io\\\/2016\\\/11\\\/05\\\/swift-custom-segue\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/seimith.io\\\/2016\\\/11\\\/05\\\/swift-custom-segue\\\/\"},\"author\":{\"name\":\"Smith\",\"@id\":\"https:\\\/\\\/seimith.io\\\/#\\\/schema\\\/person\\\/315065130ef0017986daf9a1127ce80a\"},\"headline\":\"(Swift) Custom Segue\",\"datePublished\":\"2016-11-05T21:19:00+00:00\",\"dateModified\":\"2024-07-20T00:36:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/seimith.io\\\/2016\\\/11\\\/05\\\/swift-custom-segue\\\/\"},\"wordCount\":523,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/seimith.io\\\/2016\\\/11\\\/05\\\/swift-custom-segue\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/seimith.io\\\/wp-content\\\/uploads\\\/2016\\\/11\\\/1.png\",\"keywords\":[\"Code\"],\"articleSection\":[\"Post\"],\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/seimith.io\\\/2016\\\/11\\\/05\\\/swift-custom-segue\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/seimith.io\\\/2016\\\/11\\\/05\\\/swift-custom-segue\\\/\",\"url\":\"https:\\\/\\\/seimith.io\\\/2016\\\/11\\\/05\\\/swift-custom-segue\\\/\",\"name\":\"(Swift) Custom Segue - S(ei)mith.io\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/seimith.io\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/seimith.io\\\/2016\\\/11\\\/05\\\/swift-custom-segue\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/seimith.io\\\/2016\\\/11\\\/05\\\/swift-custom-segue\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/seimith.io\\\/wp-content\\\/uploads\\\/2016\\\/11\\\/1.png\",\"datePublished\":\"2016-11-05T21:19:00+00:00\",\"dateModified\":\"2024-07-20T00:36:30+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/seimith.io\\\/#\\\/schema\\\/person\\\/315065130ef0017986daf9a1127ce80a\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/seimith.io\\\/2016\\\/11\\\/05\\\/swift-custom-segue\\\/#breadcrumb\"},\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/seimith.io\\\/2016\\\/11\\\/05\\\/swift-custom-segue\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/seimith.io\\\/2016\\\/11\\\/05\\\/swift-custom-segue\\\/#primaryimage\",\"url\":\"https:\\\/\\\/seimith.io\\\/wp-content\\\/uploads\\\/2016\\\/11\\\/1.png\",\"contentUrl\":\"https:\\\/\\\/seimith.io\\\/wp-content\\\/uploads\\\/2016\\\/11\\\/1.png\",\"width\":630,\"height\":446},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/seimith.io\\\/2016\\\/11\\\/05\\\/swift-custom-segue\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/seimith.io\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"(Swift) Custom Segue\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/seimith.io\\\/#website\",\"url\":\"https:\\\/\\\/seimith.io\\\/\",\"name\":\"s(ei)mith.io\",\"description\":\"Ramblings written by\u00a0Smith Suth\u00a0who works at the intersection of Engineering, Product, and Design.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/seimith.io\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"pt-BR\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/seimith.io\\\/#\\\/schema\\\/person\\\/315065130ef0017986daf9a1127ce80a\",\"name\":\"Smith\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a403a51628e8e4553b69960e9eb8b67184121e56ddf2fdf28c5f9515bb518208?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a403a51628e8e4553b69960e9eb8b67184121e56ddf2fdf28c5f9515bb518208?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a403a51628e8e4553b69960e9eb8b67184121e56ddf2fdf28c5f9515bb518208?s=96&d=mm&r=g\",\"caption\":\"Smith\"},\"sameAs\":[\"https:\\\/\\\/seimith.io\"],\"url\":\"https:\\\/\\\/seimith.io\\\/pt\\\/author\\\/seimithsuth\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"(Swift) Custom Segue - S(ei)mith.io","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/seimith.io\/pt\/2016\/11\/05\/swift-custom-segue\/","og_locale":"pt_BR","og_type":"article","og_title":"(Swift) Custom Segue - S(ei)mith.io","og_description":"This tutorial will demonstrate how to add a custom segue to your Swift app. There are a few generic segues that are available to use in Xcode, however, you might be in a situation where you need specific transitions that might be better suited for gestures. In this case, the animation in play will be [&hellip;]","og_url":"https:\/\/seimith.io\/pt\/2016\/11\/05\/swift-custom-segue\/","og_site_name":"S(ei)mith.io","article_published_time":"2016-11-05T21:19:00+00:00","article_modified_time":"2024-07-20T00:36:30+00:00","og_image":[{"width":630,"height":446,"url":"https:\/\/seimith.io\/wp-content\/uploads\/2016\/11\/1.png","type":"image\/png"}],"author":"Smith","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Smith","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/seimith.io\/2016\/11\/05\/swift-custom-segue\/#article","isPartOf":{"@id":"https:\/\/seimith.io\/2016\/11\/05\/swift-custom-segue\/"},"author":{"name":"Smith","@id":"https:\/\/seimith.io\/#\/schema\/person\/315065130ef0017986daf9a1127ce80a"},"headline":"(Swift) Custom Segue","datePublished":"2016-11-05T21:19:00+00:00","dateModified":"2024-07-20T00:36:30+00:00","mainEntityOfPage":{"@id":"https:\/\/seimith.io\/2016\/11\/05\/swift-custom-segue\/"},"wordCount":523,"commentCount":0,"image":{"@id":"https:\/\/seimith.io\/2016\/11\/05\/swift-custom-segue\/#primaryimage"},"thumbnailUrl":"https:\/\/seimith.io\/wp-content\/uploads\/2016\/11\/1.png","keywords":["Code"],"articleSection":["Post"],"inLanguage":"pt-BR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/seimith.io\/2016\/11\/05\/swift-custom-segue\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/seimith.io\/2016\/11\/05\/swift-custom-segue\/","url":"https:\/\/seimith.io\/2016\/11\/05\/swift-custom-segue\/","name":"(Swift) Custom Segue - S(ei)mith.io","isPartOf":{"@id":"https:\/\/seimith.io\/#website"},"primaryImageOfPage":{"@id":"https:\/\/seimith.io\/2016\/11\/05\/swift-custom-segue\/#primaryimage"},"image":{"@id":"https:\/\/seimith.io\/2016\/11\/05\/swift-custom-segue\/#primaryimage"},"thumbnailUrl":"https:\/\/seimith.io\/wp-content\/uploads\/2016\/11\/1.png","datePublished":"2016-11-05T21:19:00+00:00","dateModified":"2024-07-20T00:36:30+00:00","author":{"@id":"https:\/\/seimith.io\/#\/schema\/person\/315065130ef0017986daf9a1127ce80a"},"breadcrumb":{"@id":"https:\/\/seimith.io\/2016\/11\/05\/swift-custom-segue\/#breadcrumb"},"inLanguage":"pt-BR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/seimith.io\/2016\/11\/05\/swift-custom-segue\/"]}]},{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/seimith.io\/2016\/11\/05\/swift-custom-segue\/#primaryimage","url":"https:\/\/seimith.io\/wp-content\/uploads\/2016\/11\/1.png","contentUrl":"https:\/\/seimith.io\/wp-content\/uploads\/2016\/11\/1.png","width":630,"height":446},{"@type":"BreadcrumbList","@id":"https:\/\/seimith.io\/2016\/11\/05\/swift-custom-segue\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/seimith.io\/"},{"@type":"ListItem","position":2,"name":"(Swift) Custom Segue"}]},{"@type":"WebSite","@id":"https:\/\/seimith.io\/#website","url":"https:\/\/seimith.io\/","name":"s(ei)mith.io","description":"Ramblings written by\u00a0Smith Suth\u00a0who works at the intersection of Engineering, Product, and Design.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/seimith.io\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"pt-BR"},{"@type":"Person","@id":"https:\/\/seimith.io\/#\/schema\/person\/315065130ef0017986daf9a1127ce80a","name":"Smith","image":{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/secure.gravatar.com\/avatar\/a403a51628e8e4553b69960e9eb8b67184121e56ddf2fdf28c5f9515bb518208?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/a403a51628e8e4553b69960e9eb8b67184121e56ddf2fdf28c5f9515bb518208?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a403a51628e8e4553b69960e9eb8b67184121e56ddf2fdf28c5f9515bb518208?s=96&d=mm&r=g","caption":"Smith"},"sameAs":["https:\/\/seimith.io"],"url":"https:\/\/seimith.io\/pt\/author\/seimithsuth\/"}]}},"_links":{"self":[{"href":"https:\/\/seimith.io\/pt\/wp-json\/wp\/v2\/posts\/66","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/seimith.io\/pt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/seimith.io\/pt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/seimith.io\/pt\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/seimith.io\/pt\/wp-json\/wp\/v2\/comments?post=66"}],"version-history":[{"count":1,"href":"https:\/\/seimith.io\/pt\/wp-json\/wp\/v2\/posts\/66\/revisions"}],"predecessor-version":[{"id":67,"href":"https:\/\/seimith.io\/pt\/wp-json\/wp\/v2\/posts\/66\/revisions\/67"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/seimith.io\/pt\/wp-json\/wp\/v2\/media\/293"}],"wp:attachment":[{"href":"https:\/\/seimith.io\/pt\/wp-json\/wp\/v2\/media?parent=66"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/seimith.io\/pt\/wp-json\/wp\/v2\/categories?post=66"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/seimith.io\/pt\/wp-json\/wp\/v2\/tags?post=66"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}