ios - SpriteKit (Swift) orientation change -


i making/made game in landscape orientation , have facebook , twitter button in main menu either open app or safari. problem have app or safari opens in portrait mode , when switch game briefly shows in portrait before changing landscape. shows multitasking preview in portrait.

it not big deal brief 1-2 seconds game in portrait mode squashed , looks sort of ugly , unprofessional. happens when use 2 social media buttons, when switch portrait app via multitasking game stay in landscape upon return.

i have being trying figure out cannot find anything, swift. appreciated. thanks

ps. code used social media parts, think pretty straight forward , boiler plate.

//mark: - load social media func loadfacebook() {      var appurl = nsurl(string: "app id here")     var weburl = nsurl(string: "web id here")      if(uiapplication.sharedapplication().canopenurl(appurl!)) {         // app         uiapplication.sharedapplication().openurl(appurl!)     } else {         // safari         uiapplication.sharedapplication().openurl(weburl!)     } }  func loadtwitter() {      var appurl = nsurl(string: "app id here")     var weburl = nsurl(string: "web id here")      if(uiapplication.sharedapplication().canopenurl(appurl!)) {         // app         uiapplication.sharedapplication().openurl(appurl!)     } else {         // safari         uiapplication.sharedapplication().openurl(weburl!)     } } 

see here answer still issue there not lot of information about.

swift sprite kit landscape forced portrait


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -