ios - How to "dismiss" a UIViewController that was set as rootViewController at MyScene (SpriteKit)? -


i'm creating game using spritekit , make class pause

settingsviewcontroller *pause = [[settingsviewcontroller alloc] init];  self.view.window.rootviewcontroller = set; 

now want set

self.view.window.rootviewcontroller = nil; 

from pause , make game go left.

obs: used

self.scene.view.paused = yes; 

to stop skscene.

just show custom view hide it, when comes remove it. allows show game's splash screen when in background

public override void didenterbackground (uiapplication application)     {         addscreencover ();     }  public screencoverview addscreencover(float alpha = 1f) {         screencoverview view = new screencoverview (window.bounds);         view.alpha = alpha;         window.addsubview (view);         window.bringsubviewtofront (view);          return view;     }      public void removescreencover() {         foreach (var view in window.subviews) {             if (view.gettype () == typeof(screencoverview)) {                 uiview.animate (                     .1,                     0,                     uiviewanimationoptions.curvelinear,                     () => {                         view.alpha = 0f;                     },                     () => {                         view.removefromsuperview ();                     }                 );                   break;             }         }       } 

Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -