I have my iAd currently displaying at the top, but I believe it will look better at the bottom. How can I modify my code to accomplish this without interface builder. Also if anyone sees any errors, please let me know. This is my first iAd attempt.
- (void)viewDidLoad {
[super viewDidLoad];
adView = [[ADBannerView alloc] initWithFrame:CGRectZero];
adView.frame = CGRectOffset(adView.frame, 0, -50);
adView.requiredContentSizeIdentifiers = [NSSet setWithObject:ADBannerContentSizeIdentifier320x50];
adView.currentContentSizeIdentifier = ADBannerContentSizeIdentifier320x50;
[self.view addSubview:adView];
adView.delegate=self;
self.bannerIsVisible=NO;
[super viewDidLoad];
NSArray *langArray = [[NSArray alloc] initWithObjects:
@"Split", @"2", @"3", @"4", @"5", @"6", @"7", @"8", @"9", @"10", nil];
self.people = langArray;
[langArray release];
NSArray *osArray = [[NSArray alloc] initWithObjects:
@"0%", @"1%", @"2%", @"3%", @"4%", @"5%", @"6%", @"7%", @"8%", @"9%",
@"10%", @"11%", @"12%", @"13%", @"14%", @"15%", @"16%", @"17%", @"18%",
@"19%", @"20%", @"21%", @"22%", @"23%", @"24%", @"25%", @"30%", @"35%",
@"40%", @"45%", @"50%", nil];
self.percent = osArray;
[osArray release];
}
I also added a banner for reference into interface builder and used that to input into the code, that does not work as well.
adView.frame = CGRectOffset(adView.frame, 0, 410);