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.
Comments
Post a Comment