{"id":5677,"date":"2016-12-20T21:40:48","date_gmt":"2016-12-21T05:40:48","guid":{"rendered":"https:\/\/blog.mhvt.net\/?p=5677"},"modified":"2016-12-20T21:40:48","modified_gmt":"2016-12-21T05:40:48","slug":"ios-swift-creating-a-custom-progress-wheel","status":"publish","type":"post","link":"https:\/\/blog.mhvt.net\/?p=5677","title":{"rendered":"iOS &#038; Swift \u00e2\u20ac\u201c Creating a Custom Progress Wheel"},"content":{"rendered":"<p><a href=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"mac\/mac_shareware\/iphoneImage.jpg\" width=\"120\" height=\"120\" alt=\"iPhone custom slider\" \/><\/a><br \/>\n<br \/><\/br><br \/>\n<br \/><\/br><br \/>\nTOKYO (MacHouse) &#8211; If you want to convince an <strong>Apple<\/strong> reviewer that an app that you are submitting to their <strong>App Store<\/strong> is something extraordinary, you&#8217;ll have to use a unique feature that might surprise or impress them.  Maybe, use a custom progress wheel?  So I created something a few weeks ago.  And I&#8217;ve decided to convert it for <strong>Swift 3<\/strong>.  That&#8217;s where I run into a lot of trouble.  Well, it&#8217;s finally done.  So let&#8217;s see what my progress wheel looks like. <!--more--><br \/>\n<br \/><\/br><\/p>\n<table width=\"464\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tr>\n<td width=\"220\" valign=\"top\"><a href=\"mac\/mac_shareware\/dotprogresswheel\/dotprogresswheelScreenshot.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"mac\/mac_shareware\/dotprogresswheel\/thumnail_dotprogresswheelScreenshot.jpg\" width=\"220\" height=\"406\" alt=\"iOS Swift\"\/><\/a><\/a><\/p>\n<div align=\"center\">Screenshot 1<\/div>\n<\/td>\n<td width=\"20\">&nbsp;<\/td>\n<td width=\"220\" valign=\"top\"><a href=\"mac\/mac_shareware\/dotprogresswheel\/dotprogresswheelXcode.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"mac\/mac_shareware\/dotprogresswheel\/thumnail_dotprogresswheelXcode.jpg\" width=\"220\" height=\"127\" alt=\"iOS Swift\"\/><\/a><\/a><\/p>\n<div align=\"center\">Screenshot 2<\/div>\n<\/td>\n<\/tr>\n<\/table>\n<p><\/br><br \/>\nMy progress wheel consists of eight small circles in slightly different colors.  In order to create a rotating wheel like mine, you certainly have to know how to animate <strong>UIView<\/strong>.  And I use <strong>CABasicAnimation<\/strong> for this task since I only intend to rotate the wheel for six seconds.  (See Screenshot 2.)  As for a view object that encapsulates eight small circles, I have created eight <strong>CAShapeLayer<\/strong> objects.  That&#8217;s all done with a class called CirclesView that I have in my <strong>Xcode project<\/strong>.<\/p>\n<p>By the way, as far as eight different gradual colors are concerned, I&#8217;ve used a desktop application that I developed just about a year ago.  It&#8217;s call <strong>Text n Colors<\/strong>.  I never imagined it would be useful in this sort of situation.  GGGGG&#8230;<br \/>\n<br \/><\/br><br \/>\nClick <a href=\"mac\/mac_shareware\/dotprogresswheel\/dotprogresswheelVideo.mov\">here<\/a> to watch a quick iPhone Simulator QuickTime movie.  Just for you to know, the duration of this video is 59 seconds.  It shows a wheel with three different sets of colors.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>TOKYO (MacHouse) &#8211; If you want to convince an Apple reviewer that an app that you are submitting to their App Store is something extraordinary, you&#8217;ll have to use a unique feature that might surprise or impress them. Maybe, use &hellip; <a href=\"https:\/\/blog.mhvt.net\/?p=5677\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":342,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[504,507],"tags":[],"class_list":["post-5677","post","type-post","status-publish","format-standard","hentry","category-ios","category-swift"],"_links":{"self":[{"href":"https:\/\/blog.mhvt.net\/index.php?rest_route=\/wp\/v2\/posts\/5677","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.mhvt.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mhvt.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mhvt.net\/index.php?rest_route=\/wp\/v2\/users\/342"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mhvt.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5677"}],"version-history":[{"count":3,"href":"https:\/\/blog.mhvt.net\/index.php?rest_route=\/wp\/v2\/posts\/5677\/revisions"}],"predecessor-version":[{"id":5680,"href":"https:\/\/blog.mhvt.net\/index.php?rest_route=\/wp\/v2\/posts\/5677\/revisions\/5680"}],"wp:attachment":[{"href":"https:\/\/blog.mhvt.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5677"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mhvt.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5677"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mhvt.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5677"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}