{"id":542,"date":"2016-01-15T00:50:30","date_gmt":"2016-01-14T23:50:30","guid":{"rendered":"http:\/\/eiseler.de\/wordpress\/?p=542"},"modified":"2016-01-15T12:54:45","modified_gmt":"2016-01-15T11:54:45","slug":"swing-reach-other-controller-from-a-tabbarcontroller","status":"publish","type":"post","link":"http:\/\/eiseler.de\/wordpress\/?p=542","title":{"rendered":"Swift &#8211; Reach other Controller from a TabBarController"},"content":{"rendered":"<p>Just a small Swift code snippet, how to reach other Controllers from TabBarController.<br \/>\nFirst get all the view controllers. Then get a specific one.<\/p>\n<pre>var anArrayViewControllers = self.tabBarController!.viewControllers\r\nvar aSecondViewController: SecondViewController\r\naSecondViewController = anArrayViewControllers![1] as! SecondViewController\r\naSecondViewController.onlytest()<\/pre>\n<p>&nbsp;<\/p>\n<p>iOS, Xcode, Swift, TabBarController<\/p>\n<div class=\"sharedaddy sd-sharing-enabled\"><div class=\"robots-nocontent sd-block sd-social sd-social-icon-text sd-sharing\"><h3 class=\"sd-title\">Share this:<\/h3><div class=\"sd-content\"><ul><li class=\"share-facebook\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-facebook-542\" class=\"share-facebook sd-button share-icon\" href=\"http:\/\/eiseler.de\/wordpress\/?p=542&amp;share=facebook\" target=\"_blank\" title=\"Click to share on Facebook\"><span>Facebook<\/span><\/a><\/li><li class=\"share-twitter\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-twitter-542\" class=\"share-twitter sd-button share-icon\" href=\"http:\/\/eiseler.de\/wordpress\/?p=542&amp;share=twitter\" target=\"_blank\" title=\"Click to share on Twitter\"><span>Twitter<\/span><\/a><\/li><li class=\"share-linkedin\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-linkedin-542\" class=\"share-linkedin sd-button share-icon\" href=\"http:\/\/eiseler.de\/wordpress\/?p=542&amp;share=linkedin\" target=\"_blank\" title=\"Click to share on LinkedIn\"><span>LinkedIn<\/span><\/a><\/li><li class=\"share-pocket\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-pocket sd-button share-icon\" href=\"http:\/\/eiseler.de\/wordpress\/?p=542&amp;share=pocket\" target=\"_blank\" title=\"Click to share on Pocket\"><span>Pocket<\/span><\/a><\/li><li class=\"share-end\"><\/li><\/ul><\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Just a small Swift code snippet, how to reach other Controllers from TabBarController. First get all the view controllers. Then get a specific one. var anArrayViewControllers = self.tabBarController!.viewControllers var aSecondViewController: SecondViewController aSecondViewController = anArrayViewControllers![1] as! SecondViewController aSecondViewController.onlytest() &nbsp; iOS, Xcode, &hellip; <a href=\"http:\/\/eiseler.de\/wordpress\/?p=542\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n<div class=\"sharedaddy sd-sharing-enabled\"><div class=\"robots-nocontent sd-block sd-social sd-social-icon-text sd-sharing\"><h3 class=\"sd-title\">Share this:<\/h3><div class=\"sd-content\"><ul><li class=\"share-facebook\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-facebook-542\" class=\"share-facebook sd-button share-icon\" href=\"http:\/\/eiseler.de\/wordpress\/?p=542&amp;share=facebook\" target=\"_blank\" title=\"Click to share on Facebook\"><span>Facebook<\/span><\/a><\/li><li class=\"share-twitter\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-twitter-542\" class=\"share-twitter sd-button share-icon\" href=\"http:\/\/eiseler.de\/wordpress\/?p=542&amp;share=twitter\" target=\"_blank\" title=\"Click to share on Twitter\"><span>Twitter<\/span><\/a><\/li><li class=\"share-linkedin\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-linkedin-542\" class=\"share-linkedin sd-button share-icon\" href=\"http:\/\/eiseler.de\/wordpress\/?p=542&amp;share=linkedin\" target=\"_blank\" title=\"Click to share on LinkedIn\"><span>LinkedIn<\/span><\/a><\/li><li class=\"share-pocket\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-pocket sd-button share-icon\" href=\"http:\/\/eiseler.de\/wordpress\/?p=542&amp;share=pocket\" target=\"_blank\" title=\"Click to share on Pocket\"><span>Pocket<\/span><\/a><\/li><li class=\"share-end\"><\/li><\/ul><\/div><\/div><\/div>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false},"categories":[10,29],"tags":[30,40,31],"class_list":["post-542","post","type-post","status-publish","format-standard","hentry","category-ios-app","category-swift","tag-ios","tag-swift","tag-xcode"],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8zAuQ-8K","jetpack-related-posts":[{"id":10,"url":"http:\/\/eiseler.de\/wordpress\/?p=10","url_meta":{"origin":542,"position":0},"title":"iLOE quo vadis?","date":"17\/10\/2012","format":false,"excerpt":"As people ask for feature requests for iLOE, I thaught it might be a good idea to write a few words about the road map. By now there are so many changes in xcode and in a lot of libraries, that it would take a very long time just to\u2026","rel":"","context":"In &quot;iOS App&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":13,"url":"http:\/\/eiseler.de\/wordpress\/?p=13","url_meta":{"origin":542,"position":1},"title":"Issue in iLOE newest version - fixed - waiting","date":"24\/06\/2011","format":false,"excerpt":"Sorry, it seems that the new iLOE release got a problem. I am working on this. It seems that the migration to XCode 4 didn\u2018t work out. Sunday Update: After a long search. I think I got it. Quit strange. The new version is uploaded and waiting for review. I\u2026","rel":"","context":"In &quot;iOS App&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":400,"url":"http:\/\/eiseler.de\/wordpress\/?p=400","url_meta":{"origin":542,"position":2},"title":"iLOE for iPad, work in progress ....","date":"20\/05\/2013","format":false,"excerpt":"Hard working on iLOE for iPad (OpenStreetMap editor for iPad). A little bit tired, finding out that it just takes time (and energy) to implement one usecase after the other. \u00a0Lost a few hours last night, just to find out that sending data with \"DELETE\" isn't supported on most REST\u2026","rel":"","context":"In &quot;iOS App&quot;","img":{"alt_text":"","src":"https:\/\/i2.wp.com\/eiseler.de\/wordpress\/wp-content\/uploads\/2013\/05\/IMG_0136-300x225.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":574,"url":"http:\/\/eiseler.de\/wordpress\/?p=574","url_meta":{"origin":542,"position":3},"title":"iOS SKAction playSoundFileNamed fails?","date":"28\/02\/2016","format":false,"excerpt":"On tvOs I tried SKAction playSoundFileNamed to play a short sound. Unfortunately it didn't work. After some research I found this as solution: \/\/SKAction.playSoundFileNamed(\"Achievement.caf\", waitForCompletion: true) self.runAction(SKAction.playSoundFileNamed(\"Achievement.caf\", waitForCompletion: false))","rel":"","context":"In &quot;iOS App&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":384,"url":"http:\/\/eiseler.de\/wordpress\/?p=384","url_meta":{"origin":542,"position":4},"title":"iOS: MKNetworkKit send XML (simple, easy, fast)","date":"05\/05\/2013","format":false,"excerpt":"Maybe this is what you're looking for: Easy sending some XML with MKNetworkKit. This works for me: MKNetworkOperation *op = [self operationWithPath:@\"api\/0.6\/changeset\/create\" params: nil httpMethod:@\"PUT\"]; [op setCustomPostDataEncodingHandler: ^NSString *(NSDictionary *aD){return @\"Put your XML here\";} forType:@\"text\/xml\"]; That's it","rel":"","context":"In &quot;iOS App&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":12,"url":"http:\/\/eiseler.de\/wordpress\/?p=12","url_meta":{"origin":542,"position":5},"title":"iLOE\u2018s back in town","date":"30\/06\/2011","format":false,"excerpt":"Today apple reviewed the new iLOE Version 1.9.4 so I could put it back in the store. If you are interested in iOS programming what happened? If you use a class from a external lib just in a xib there seems to be a chance that the compiler\/linker while optimizing\u2026","rel":"","context":"In &quot;iOS App&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/eiseler.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/542","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/eiseler.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/eiseler.de\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/eiseler.de\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/eiseler.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=542"}],"version-history":[{"count":7,"href":"http:\/\/eiseler.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/542\/revisions"}],"predecessor-version":[{"id":550,"href":"http:\/\/eiseler.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/542\/revisions\/550"}],"wp:attachment":[{"href":"http:\/\/eiseler.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=542"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/eiseler.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=542"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/eiseler.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=542"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}