I developed an iOS application using the Sprite Kit. Anyone who has developed an iOS game with the Sprite Kit knows the label in the bottom corner with debugging information. I am trying to remove debug information in the bottom corner, which gives the number of nodes and fps. (e.g. 1 node 60.0 fps)
I tried the following code in a method -(id)initWithSize:(CGSize)sizein my file .m, but it does nothing. Is this the correct code to remove a debug mark, or is there a better way to remove a shortcut?
-(id)initWithSize:(CGSize)size
.m
SKView *spriteView = (SKView *) self.view; spriteView.showsNodeCount = NO; spriteView.showsFPS = NO;
-(id)initWithSize:(CGSize)size - , . , SKScene. ViewContoller. ViewController viewWillLayoutSubviews. , - :
SKScene
ViewContoller
ViewController
viewWillLayoutSubviews
skView.showsFPS = YES; skView.showsNodeCount = YES;
:
skView.showsFPS = NO; skView.showsNodeCount = NO;
, ..:)
Swift GameScene.swift, "skView.showsFPS" "skView.showsNodeCount", "true" "false". FPS !
spriteView.showsDrawCount=NO . , .
spriteView.showsDrawCount=NO
DEBUG , , App Store.
DEBUG
// GameViewController.swift override func viewDidLoad() { super.viewDidLoad() let scene = self.sceneManager.scene scene.gameDelegate = self let skView = self.view as! SKView skView.ignoresSiblingOrder = true #if DEBUG skView.showsFPS = true skView.showsNodeCount = true #endif skView.presentScene((scene as! SKScene)) }
Source: https://habr.com/ru/post/1536896/More articles:Android - does R.Resource change identifier at runtime - androidChange php.ini values from shell script - phpThe non-stationary member function constexpr will not implicitly 'const' in C ++ 1y; add 'const' to avoid a change in behavior - c ++ 11What is the fastest way to get "const wchar_t *" from QString - c ++https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1536895/adding-textbox-dynamically-and-save-values-to-the-database-in-aspnet-mvc&usg=ALkJrhgi-TiMpozkh6PD2LxaDib0hl38TQПрименяя var или # 'к списку функций в Clojure - functional-programmingWhat is the default name and font size for UIPickerview selection values in iOS 7 and iOS 6 - ioslaravel blade includes error - syntax error, unexpected - phpDoes private class member return slower than using structure and accessing this variable directly? - c ++Ключевые события, не работающие для нескольких ckeditors (Обновлено) - javascriptAll Articles