I just finished my first game and I'm trying this code on my viewController to integrate an ad banner :
import iAd
class GameViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
var skView = self.originalContentView as SKView
var scene:SKScene = GameScene(size: skView.bounds.size)
skView.showsFPS = false
skView.showsNodeCount = false
skView.showsPhysics = false
let turbulence = SKFieldNode.turbulenceFieldWithSmoothness(0.1, animationSpeed: 0.1)
scene.addChild(turbulence)
let noise = SKFieldNode.turbulenceFieldWithSmoothness(0.4, animationSpeed: 0.1)
scene.addChild(noise)
skView.presentScene(scene)
self.canDisplayBannerAds = true
}
On my firstViewController (the game presentation) it works but not on my gameViewController and I can't understand why.
Someone can help me ?
Thank you all !!!
Aucun commentaire:
Enregistrer un commentaire