{"id":5655,"date":"2016-12-19T17:55:51","date_gmt":"2016-12-20T01:55:51","guid":{"rendered":"https:\/\/blog.mhvt.net\/?p=5655"},"modified":"2016-12-19T17:55:51","modified_gmt":"2016-12-20T01:55:51","slug":"ios-swift-making-custom-uitabbar-menu-sort-of","status":"publish","type":"post","link":"https:\/\/blog.mhvt.net\/?p=5655","title":{"rendered":"iOS &#038; Swift \u00e2\u20ac\u201c Making Custom UITabBar Menu (Sort of&#8230;)"},"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; For <strong>Apple, Inc.<\/strong>, as far as <strong>iPhone<\/strong> apps are concerned, it&#8217;s apparent that looks are more important than features.  Forget about painting the back of a fence unlike Mr. Jobs says in his biography, right?  If you only use default controls that <strong>Xcode<\/strong> offers, chances are that your app won&#8217;t even be featured as a new comer to the 1st category of your choice.<\/p>\n<p>Anyway, the other day, I visited <strong>stackoverflow<\/strong> as usual, looking for an interesting topic.  One of them that I spotted is <a href=\"http:\/\/stackoverflow.com\/questions\/41139914\/how-to-make-multiple-color-tab-bar-in-swift-3#comment69482736_41139914\">this one<\/a> where sombody wants to use color images with <strong>UITabBarController<\/strong>.  First, I ran a Google search for UITabBarController if I remember correctly and spotted some examples.  But I&#8217;ve actually decided to go my own way.  As a result, I&#8217;ve created a horizontal menu with color images at the bottom.  Looking at Screenshot 1 below, it&#8217;s not that bad. <!--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\/tabbarmania\/tabbarmania.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"mac\/mac_shareware\/tabbarmania\/_thumbnail_tabbarmania.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\/tabbarmania\/tabbarmaniaXcode.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"mac\/mac_shareware\/tabbarmania\/_thumbnail_tabbarmaniaXcode.jpg\" width=\"220\" height=\"133\" alt=\"iOS Swift\"\/><\/a><\/a><\/p>\n<div align=\"center\">Screenshot 2<\/div>\n<\/td>\n<\/tr>\n<\/table>\n<p><\/br><br \/>\nThe way I did is just use of a UIViewController subclass.  So what&#8217;s shown in the QuickTime video below is transition from one view controller to another.<br \/>\n<br \/><\/br><br \/>\nClick <a href=\"mac\/mac_shareware\/tabbarmania\/tabbarmania.mov\">here<\/a> to watch a quick iPhone Simulator QuickTime movie.<br \/>\n<br \/><\/br><br \/>\nSo if you want to create a custom menu like the one shown in Screenshot 2, first, you need to know how to subclass UIViewController.  If you know how, then just transition from one view controller to another within that UIViewController subclass with navigationController&#8217;s pushViewController method.  Whether you animate view controller transition is up to you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>TOKYO (MacHouse) &#8211; For Apple, Inc., as far as iPhone apps are concerned, it&#8217;s apparent that looks are more important than features. Forget about painting the back of a fence unlike Mr. Jobs says in his biography, right? If you &hellip; <a href=\"https:\/\/blog.mhvt.net\/?p=5655\">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-5655","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\/5655","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=5655"}],"version-history":[{"count":12,"href":"https:\/\/blog.mhvt.net\/index.php?rest_route=\/wp\/v2\/posts\/5655\/revisions"}],"predecessor-version":[{"id":5667,"href":"https:\/\/blog.mhvt.net\/index.php?rest_route=\/wp\/v2\/posts\/5655\/revisions\/5667"}],"wp:attachment":[{"href":"https:\/\/blog.mhvt.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5655"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mhvt.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5655"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mhvt.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5655"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}