{"id":51,"date":"2016-08-28T21:12:00","date_gmt":"2016-08-28T21:12:00","guid":{"rendered":"https:\/\/seimith.io\/?p=51"},"modified":"2024-07-20T00:39:50","modified_gmt":"2024-07-20T00:39:50","slug":"swift-rotating-uiview","status":"publish","type":"post","link":"https:\/\/seimith.io\/pt\/2016\/08\/28\/swift-rotating-uiview\/","title":{"rendered":"(Swift) Rotating UIView"},"content":{"rendered":"<p>This tutorial is about spinning UIViews. Why spinning things you might ask? Animations can be (for a lack of better terminology because I hate this word) delightful for users.<\/p>\n\n\n\n<p>Anywho, you might just need to animate a loading spinner thing or something for you app.<\/p>\n\n\n\n<p>In this case, I\u2019ve just created a few UIViews and added animation to it. If you want, you can even just use a UIImage component and spin that instead.<\/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-08-28-assets\/RotatingUIViewSmall.gif\" alt=\"&quot;Rotating UIViews&quot;\" title=\"Rotating UIViews\"\/><\/figure>\n\n\n\n<p><strong>Tools:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Swift 2.2<\/li>\n\n\n\n<li>Xcode Version 7.3.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\/30f83c6f0d1eaa513e6a4a466fa85e8e\/f058b\/img1.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\/30f83c6f0d1eaa513e6a4a466fa85e8e\/93582\/img1.png\" target=\"_blank\" rel=\"noreferrer noopener\"><\/a><\/p>\n\n\n\n<p><strong>Step 2: Add&nbsp;<code>UIView<\/code>&nbsp;to storyboard<\/strong>&nbsp;Search up the UIView component in the bottom left corner of Xcode and drag it into your storyboard.<\/p>\n\n\n\n<p>After adding the component to your storyboard, change it\u2019s color so that you can see it. It will default to white which can be difficult to see.<\/p>\n\n\n\n<p>If you run this in the simulator at this point, all sorts of misalignments will happen here. This is because there are no constraints.<a href=\"https:\/\/determined-mcnulty-44b4a3.netlify.app\/static\/d1d75b965ff2e63b10965b6411a9b015\/a2b91\/img2.png\" target=\"_blank\" rel=\"noreferrer noopener\"><\/a><\/p>\n\n\n\n<p><strong>Step 3: Add constraints<\/strong>* The first set of constraints that we\u2019ll add here are \u201chorizontal\u201d and \u201cvertical\u201d constraints.<\/p>\n\n\n\n<p>To do this make sure you have your UIView selected and then locate the icon at the bottom left of Xcode (look for the icon that look like sideways bar graphs). Then, check off the corresponding checkboxes.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/determined-mcnulty-44b4a3.netlify.app\/static\/4bdabcf9f455146c8c90bf5b5804c814\/f058b\/img3.png\" alt=\"&quot;Add aligning constraints to UIView&quot;\" title=\"Add aligning constraints to UIView\"\/><\/figure>\n\n\n\n<p><a href=\"https:\/\/determined-mcnulty-44b4a3.netlify.app\/static\/4bdabcf9f455146c8c90bf5b5804c814\/a2b91\/img3.png\" target=\"_blank\" rel=\"noreferrer noopener\"><\/a><\/p>\n\n\n\n<p>The second set of constraints will be to give it a \u201cwidth\u201d and \u201cheight\u201d constraint. To do this you need to find the square \u201cTie-fighter\u201d icon at the bottom left of Xcode.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/determined-mcnulty-44b4a3.netlify.app\/static\/3098c24373e4b482d95ef12a23d68087\/f058b\/img4.png\" alt=\"&quot;Add width and height constraints to UIView&quot;\" title=\"Add width and height constraints to UIView\"\/><\/figure>\n\n\n\n<p><a href=\"https:\/\/determined-mcnulty-44b4a3.netlify.app\/static\/3098c24373e4b482d95ef12a23d68087\/a2b91\/img4.png\" target=\"_blank\" rel=\"noreferrer noopener\"><\/a><\/p>\n\n\n\n<p>Once you add these two sets of constraints you\u2019ll get a warning in the \u201cDocument Outline Panel\u201d. Resolve these warnings as it will fix the placement of your UIView in your storyboard.<\/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-08-28-assets\/img5.gif\" alt=\"&quot;Fix constraint warnings&quot;\" title=\"Fix constraint warnings\"\/><\/figure>\n\n\n\n<p>At this point if you run this in the simulator you\u2019ll see that the UIView is centered in the middle of the screen in all rotations.<\/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-08-28-assets\/img6.gif\" alt=\"&quot;Simulator of UIView in the middle of the device&quot;\" title=\"Simulator of UIView in the middle of the device\"\/><\/figure>\n\n\n\n<p><strong>Step 4: Create and connect IBOutlets to your controller<\/strong>&nbsp;Now that you have your UIView set up, it\u2019s time to create an \u201cIBOutlet\u201d. This is kind of like a variable that exists in the \u201cInterface Builder\u201d and gets connected to your code.<\/p>\n\n\n\n<p>There are multiple ways of creating an \u201cIBOutlet\u201d. These are the two ways that I create them.<\/p>\n\n\n\n<p><em><strong>Version 1<\/strong><\/em>&nbsp;You want to add an&nbsp;<code>@IBOutlet<\/code>&nbsp;in your view controller.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>- Open `ViewController.swift` file\n- Add \u201c@IBOutlet weak var mySpinnerView: UIView!\u201d to the class\n- Go to the storyboard to connect UIView w\/ IBOUTLET<\/code><\/pre>\n\n\n\n<p>Your code should look something like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import UIKit\n\nclass ViewController: UIViewController {\n\n  @IBOutlet weak var mySpinnerView: UIView!\n\n  override func viewDidLoad() {\n    super.viewDidLoad()\n    \/\/ Do any additional setup after loading the view, typically from a nib.\n  }\n\n  override func didReceiveMemoryWarning() {\n    super.didReceiveMemoryWarning()\n    \/\/ Dispose of any resources that can be recreated.\n  }\n}<\/code><\/pre>\n\n\n\n<p>You should also notice that there is a tiny unfilled dot next to your&nbsp;<code>IBOutlet<\/code>. This means that this outlet is not connected to anything in your storyboard.<\/p>\n\n\n\n<p>To connect your newly created&nbsp;<code>IBOutlet<\/code>&nbsp;go back to your storyboard and then click on your view controller. Make sure you have your&nbsp;<code>Utilities<\/code>&nbsp;panel (right panel icon) open. Here, you will see that there is a list of outlets with unfilled dots as well. This is where you can click + drag to connect them. The dot should now be filled in.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/determined-mcnulty-44b4a3.netlify.app\/static\/59cc8ce874ad528ca82f7fb77ea6111c\/f058b\/img7.png\" alt=\"&quot;Connect IBOutlet from utilities panel&quot;\" title=\"Connect IBOutlet from utilities panel\"\/><\/figure>\n\n\n\n<p><a href=\"https:\/\/determined-mcnulty-44b4a3.netlify.app\/static\/59cc8ce874ad528ca82f7fb77ea6111c\/a2b91\/img7.png\" target=\"_blank\" rel=\"noreferrer noopener\"><\/a><\/p>\n\n\n\n<p><em><strong>Version 2<\/strong><\/em>&nbsp;Open your storyboard and click on&nbsp;<code>Show Assistant Editor<\/code>&nbsp;(this is the venn-diagram-looking icon in the top of Xcode).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Ctrl + Click drag the UIView into your class and then name it. The dot should not be filled in.<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/determined-mcnulty-44b4a3.netlify.app\/static\/dcd476af70757b47779985d0e9508919\/f058b\/img8.png\" alt=\"&quot;Connect IBOutlet from your storyboard&quot;\" title=\"Connect IBOutlet from your storyboard\"\/><\/figure>\n\n\n\n<p><a href=\"https:\/\/determined-mcnulty-44b4a3.netlify.app\/static\/dcd476af70757b47779985d0e9508919\/a2b91\/img8.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\/f4f09c0ae6020025ee32c8905f5e6cfb\/f058b\/img9.png\" alt=\"&quot;Connect IBOutlet from your storyboard&quot;\" title=\"Connect IBOutlet from your storyboard\"\/><\/figure>\n\n\n\n<p><a href=\"https:\/\/determined-mcnulty-44b4a3.netlify.app\/static\/f4f09c0ae6020025ee32c8905f5e6cfb\/a2b91\/img9.png\" target=\"_blank\" rel=\"noreferrer noopener\"><\/a><\/p>\n\n\n\n<p><strong>Step 5: Add code to rotate forever<\/strong>&nbsp;In this example, we\u2019re adding animation to spin a&nbsp;<code>UIView<\/code>&nbsp;once the app loads. To do that, we\u2019ll create a function, then call that function within the&nbsp;<code>viewDidLoad<\/code>&nbsp;lifecycle function.<\/p>\n\n\n\n<p>This is the function that contains the animation.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>func beginAnimation () {\n  UIView.animateWithDuration(1.0, delay: 0, options: .CurveLinear, animations: { () -&gt; Void in\n    self.mySpinnerView.transform = CGAffineTransformRotate(self.mySpinnerView.transform, CGFloat(M_PI))\n  }) { (finished) -&gt; Void in\n    self.beginAnimation()\n  }\n}<\/code><\/pre>\n\n\n\n<p>Add code in your&nbsp;<code>viewDidLoad<\/code>&nbsp;to start the spinning<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>self.beginAnimation()<\/code><\/pre>\n\n\n\n<p>Your file should look like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import UIKit\n\nclass ViewController: UIViewController {\n\n  \/\/ 1. We just added this IBOutlet\n  @IBOutlet weak var mySpinnerView: UIView!\n\n  override func viewDidLoad() {\n    super.viewDidLoad()\n\n    \/\/ 3. Starting animation when app loads\n    self.beginAnimation()\n  }\n\n  override func didReceiveMemoryWarning() {\n    super.didReceiveMemoryWarning()\n    \/\/ Dispose of any resources that can be recreated.\n  }\n\n  \/\/ 2. Function to spin foreverrrr\n  func beginAnimation () {\n    UIView.animateWithDuration(1.0, delay: 0, options: .CurveLinear, animations: { () -&gt; Void in\n      self.mySpinnerView.transform = CGAffineTransformRotate(self.mySpinnerView.transform, CGFloat(M_PI))\n    }) { (finished) -&gt; Void in\n      self.beginAnimation()\n    }\n  }\n}<\/code><\/pre>\n\n\n\n<p>And that should be it. When you reload your simulator you should see a rotating pink square. Play around and add more spinning things!<\/p>\n\n\n\n<p><strong>You can get the storyboard project is in&nbsp;<a href=\"https:\/\/github.com\/seimith\/SwiftRotatingUIView\">this repo<\/a>.<\/strong><\/p>","protected":false},"excerpt":{"rendered":"<p>This tutorial is about spinning UIViews. Why spinning things you might ask? Animations can be (for a lack of better terminology because I hate this word) delightful for users. Anywho, you might just need to animate a loading spinner thing or something for you app. In this case, I\u2019ve just created a few UIViews and [&hellip;]<\/p>","protected":false},"author":1,"featured_media":295,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[20],"class_list":["post-51","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) Rotating UIView - 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\/08\/28\/swift-rotating-uiview\/\" \/>\n<meta property=\"og:locale\" content=\"pt_BR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"(Swift) Rotating UIView - S(ei)mith.io\" \/>\n<meta property=\"og:description\" content=\"This tutorial is about spinning UIViews. Why spinning things you might ask? Animations can be (for a lack of better terminology because I hate this word) delightful for users. Anywho, you might just need to animate a loading spinner thing or something for you app. In this case, I\u2019ve just created a few UIViews and [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/seimith.io\/pt\/2016\/08\/28\/swift-rotating-uiview\/\" \/>\n<meta property=\"og:site_name\" content=\"S(ei)mith.io\" \/>\n<meta property=\"article:published_time\" content=\"2016-08-28T21:12:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-07-20T00:39:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/seimith.io\/wp-content\/uploads\/2016\/08\/RotatingUIViewSmall.gif\" \/>\n\t<meta property=\"og:image:width\" content=\"320\" \/>\n\t<meta property=\"og:image:height\" content=\"496\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/gif\" \/>\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\\\/08\\\/28\\\/swift-rotating-uiview\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/seimith.io\\\/2016\\\/08\\\/28\\\/swift-rotating-uiview\\\/\"},\"author\":{\"name\":\"Smith\",\"@id\":\"https:\\\/\\\/seimith.io\\\/#\\\/schema\\\/person\\\/315065130ef0017986daf9a1127ce80a\"},\"headline\":\"(Swift) Rotating UIView\",\"datePublished\":\"2016-08-28T21:12:00+00:00\",\"dateModified\":\"2024-07-20T00:39:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/seimith.io\\\/2016\\\/08\\\/28\\\/swift-rotating-uiview\\\/\"},\"wordCount\":629,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/seimith.io\\\/2016\\\/08\\\/28\\\/swift-rotating-uiview\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/seimith.io\\\/wp-content\\\/uploads\\\/2016\\\/08\\\/RotatingUIViewSmall.gif\",\"keywords\":[\"Code\"],\"articleSection\":[\"Post\"],\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/seimith.io\\\/2016\\\/08\\\/28\\\/swift-rotating-uiview\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/seimith.io\\\/2016\\\/08\\\/28\\\/swift-rotating-uiview\\\/\",\"url\":\"https:\\\/\\\/seimith.io\\\/2016\\\/08\\\/28\\\/swift-rotating-uiview\\\/\",\"name\":\"(Swift) Rotating UIView - S(ei)mith.io\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/seimith.io\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/seimith.io\\\/2016\\\/08\\\/28\\\/swift-rotating-uiview\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/seimith.io\\\/2016\\\/08\\\/28\\\/swift-rotating-uiview\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/seimith.io\\\/wp-content\\\/uploads\\\/2016\\\/08\\\/RotatingUIViewSmall.gif\",\"datePublished\":\"2016-08-28T21:12:00+00:00\",\"dateModified\":\"2024-07-20T00:39:50+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/seimith.io\\\/#\\\/schema\\\/person\\\/315065130ef0017986daf9a1127ce80a\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/seimith.io\\\/2016\\\/08\\\/28\\\/swift-rotating-uiview\\\/#breadcrumb\"},\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/seimith.io\\\/2016\\\/08\\\/28\\\/swift-rotating-uiview\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/seimith.io\\\/2016\\\/08\\\/28\\\/swift-rotating-uiview\\\/#primaryimage\",\"url\":\"https:\\\/\\\/seimith.io\\\/wp-content\\\/uploads\\\/2016\\\/08\\\/RotatingUIViewSmall.gif\",\"contentUrl\":\"https:\\\/\\\/seimith.io\\\/wp-content\\\/uploads\\\/2016\\\/08\\\/RotatingUIViewSmall.gif\",\"width\":320,\"height\":496},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/seimith.io\\\/2016\\\/08\\\/28\\\/swift-rotating-uiview\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/seimith.io\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"(Swift) Rotating UIView\"}]},{\"@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) Rotating UIView - 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\/08\/28\/swift-rotating-uiview\/","og_locale":"pt_BR","og_type":"article","og_title":"(Swift) Rotating UIView - S(ei)mith.io","og_description":"This tutorial is about spinning UIViews. Why spinning things you might ask? Animations can be (for a lack of better terminology because I hate this word) delightful for users. Anywho, you might just need to animate a loading spinner thing or something for you app. In this case, I\u2019ve just created a few UIViews and [&hellip;]","og_url":"https:\/\/seimith.io\/pt\/2016\/08\/28\/swift-rotating-uiview\/","og_site_name":"S(ei)mith.io","article_published_time":"2016-08-28T21:12:00+00:00","article_modified_time":"2024-07-20T00:39:50+00:00","og_image":[{"width":320,"height":496,"url":"https:\/\/seimith.io\/wp-content\/uploads\/2016\/08\/RotatingUIViewSmall.gif","type":"image\/gif"}],"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\/08\/28\/swift-rotating-uiview\/#article","isPartOf":{"@id":"https:\/\/seimith.io\/2016\/08\/28\/swift-rotating-uiview\/"},"author":{"name":"Smith","@id":"https:\/\/seimith.io\/#\/schema\/person\/315065130ef0017986daf9a1127ce80a"},"headline":"(Swift) Rotating UIView","datePublished":"2016-08-28T21:12:00+00:00","dateModified":"2024-07-20T00:39:50+00:00","mainEntityOfPage":{"@id":"https:\/\/seimith.io\/2016\/08\/28\/swift-rotating-uiview\/"},"wordCount":629,"commentCount":0,"image":{"@id":"https:\/\/seimith.io\/2016\/08\/28\/swift-rotating-uiview\/#primaryimage"},"thumbnailUrl":"https:\/\/seimith.io\/wp-content\/uploads\/2016\/08\/RotatingUIViewSmall.gif","keywords":["Code"],"articleSection":["Post"],"inLanguage":"pt-BR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/seimith.io\/2016\/08\/28\/swift-rotating-uiview\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/seimith.io\/2016\/08\/28\/swift-rotating-uiview\/","url":"https:\/\/seimith.io\/2016\/08\/28\/swift-rotating-uiview\/","name":"(Swift) Rotating UIView - S(ei)mith.io","isPartOf":{"@id":"https:\/\/seimith.io\/#website"},"primaryImageOfPage":{"@id":"https:\/\/seimith.io\/2016\/08\/28\/swift-rotating-uiview\/#primaryimage"},"image":{"@id":"https:\/\/seimith.io\/2016\/08\/28\/swift-rotating-uiview\/#primaryimage"},"thumbnailUrl":"https:\/\/seimith.io\/wp-content\/uploads\/2016\/08\/RotatingUIViewSmall.gif","datePublished":"2016-08-28T21:12:00+00:00","dateModified":"2024-07-20T00:39:50+00:00","author":{"@id":"https:\/\/seimith.io\/#\/schema\/person\/315065130ef0017986daf9a1127ce80a"},"breadcrumb":{"@id":"https:\/\/seimith.io\/2016\/08\/28\/swift-rotating-uiview\/#breadcrumb"},"inLanguage":"pt-BR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/seimith.io\/2016\/08\/28\/swift-rotating-uiview\/"]}]},{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/seimith.io\/2016\/08\/28\/swift-rotating-uiview\/#primaryimage","url":"https:\/\/seimith.io\/wp-content\/uploads\/2016\/08\/RotatingUIViewSmall.gif","contentUrl":"https:\/\/seimith.io\/wp-content\/uploads\/2016\/08\/RotatingUIViewSmall.gif","width":320,"height":496},{"@type":"BreadcrumbList","@id":"https:\/\/seimith.io\/2016\/08\/28\/swift-rotating-uiview\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/seimith.io\/"},{"@type":"ListItem","position":2,"name":"(Swift) Rotating UIView"}]},{"@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\/51","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=51"}],"version-history":[{"count":1,"href":"https:\/\/seimith.io\/pt\/wp-json\/wp\/v2\/posts\/51\/revisions"}],"predecessor-version":[{"id":52,"href":"https:\/\/seimith.io\/pt\/wp-json\/wp\/v2\/posts\/51\/revisions\/52"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/seimith.io\/pt\/wp-json\/wp\/v2\/media\/295"}],"wp:attachment":[{"href":"https:\/\/seimith.io\/pt\/wp-json\/wp\/v2\/media?parent=51"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/seimith.io\/pt\/wp-json\/wp\/v2\/categories?post=51"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/seimith.io\/pt\/wp-json\/wp\/v2\/tags?post=51"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}