简体   繁体   中英

Top screen iAd in Sprite Kit

I just finished my game in Objective-C with the Sprite Kit framework and now I want to put an iAd banner on the top of the screen but I actually have it at the bottom and I don't know how to set it on top.

I use this code in the -viewDidLoad method in the ViewController.m but it appears at the bottom

self.canDisplayBannerAds = YES;

I would thank if someone please can help me how to position the banner on the top of the screen.

Initialize your banner view like this and add it to the view

ADBannerView *bannerView = [[ADBannerView alloc]initWithAdType:ADAdTypeBanner];

The default position is on the top

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM