iad with tableview issues
Hey guys, seem to be having an issue. I think most of it is because of my limited knowledge between views but maybe figuring this out will help me figure out my larger view issues overall.
I am creating a iAd banner view on the top of the screen and then creating a navigation view (or tableview or tab bar view) but I keep getting SIGABRT errors on the [window addSubview:banner]; line. I have tried creating the banner programmatically as well as with the IB but neither seem to work. I am doing it to the window as I want the banner to be at the highest level of code. I also tried creating subview and then creating the navigation controller inside it but end up with similar results...
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
banner = [[ADBannerView alloc] initWithFrame:CGRectMake(0.0, 20.0, 320.0, 50.0)];
banner.currentContentSizeIdentifier = ADBannerContentSizeIdentifier320x50;
[window addSubview:banner];
// Add the navigation controller's view to the window and display.
navigationController.view.frame = CGRectMake(0.0, 70.0, 320.0, 410.0);
[window addSubview:navigationController.view];
[window makeKeyAndVisible];
return YES;
}
What am I doing wrong!? Big headache here.
|