I am developing an application in which i have used SKView as view for View Controller.
I paused the view when user tap any button on screen and push the new UIViewController:
Pause View Code
self.emitterView.paused = true;
func settingButtonPressed(sender: UIButton) {
self.emitterView.paused = true;
let viewCtrl = EDUIUtility.loadViewControllerFromStoryboard(EDConstant.StoryboardFileName, viewCtrlStoryboardId: EDConstant.SettingViewCtrlID)
self.pushViewController(viewCtrl)
}
On viewWillAppear i just resume the view by following code:
resume View Code
self.emitterView.paused = false;
override func viewWillAppear(animated: Bool) {
super.viewWillAppear(animated)
self.emitterView.paused = false;
}
But it is not working view is still paused until i tapped on a screen. I also checked the update method of scene presented by emitter view and working.
Note: Same Code is working fine on application background and foreground.
View Controller Push and Pop
func pushViewController(viewController:UIViewController){
UIView.transitionWithView(self.navigationController!.view, duration: 0.50,
options: UIViewAnimationOptions.TransitionFlipFromRight, animations: {
self.navigationController!.pushViewController(viewController, animated: false)
}, completion: nil)
}
func popViewController(){
UIView.transitionWithView(self.navigationController!.view, duration: 0.50,
options: UIViewAnimationOptions.TransitionFlipFromLeft, animations: {
self.navigationController!.popViewControllerAnimated(false)
}, completion: nil)
}