IAd banner position is not updating
I am currently adding iAd banners to my SpriteKit game and I have successfully served ads. But when I go to remove the banner by pushing it from the bottom, it doesn't move, although this is the exact opposite of the code to make it appear.
This is the function that is called from the notification observer:
func hideBannerAd(notification:NSNotification)
{
if bannerAdVisible == true
{
println(bannerAd.frame);
UIView.beginAnimations("hideAd", context: nil);
bannerAd.frame = CGRectOffset(bannerAd.frame, 0, bannerAd.frame.size.height);
println(bannerAd.frame);
UIView.commitAnimations()
bannerAdVisible = false
bannerAd.cancelBannerViewAction()
}
}
Operators 2 println
produce the following:
(0.0, 1024.0, 768.0, 66.0)
(0.0, 1090.0, 768.0, 66.0)
Thus, the position of the banner changes, but it is not displayed on the screen.
If you know the problem, I would appreciate a little help.
EDIT
I will add that hideBannerAd
all the code related to the declaration is in the GamveViewController.
+3
source to share