【发布时间】:2012-03-27 09:26:13
【问题描述】:
我正在使用以下代码在我的视图中显示 iAd。但我无法看到我在视图中使用的测试广告和内容。
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
CGRect bounds = [[UIScreen mainScreen] bounds];
self.window = [[UIWindow alloc] initWithFrame:bounds];
self.window.backgroundColor = [UIColor whiteColor];
_bannerView = [[ADBannerView alloc] initWithFrame:CGRectMake(0.0, bounds.size.height, 0.0, 0.0)];
_bannerView.delegate = self;
sample *sampleClassObj=[[sample alloc]init];
_navigationController =[[UINavigationController alloc]initWithRootViewController:sampleClassObj];
_navigationController.delegate = self;
self.window.rootViewController = _navigationController;
[self.window makeKeyAndVisible];
_currentController = nil;
// self.currentController=(UIViewController<BannerViewContainer> *)viewController;
return YES;
}
我已经完成了基本 iAd 实施的必要编码。 谁能告诉我我犯了什么错误,或者只是告诉我在我的项目中实施 iAd 的最简单方法。
我是 iPhone 开发人员的初学者,所以如果您找不到上述问题的解决方案,请告诉我实施 iAd 的分步过程。
提前致谢
【问题讨论】:
-
我得到了解决方案。这个问题不用回答
-
从堆栈溢出中删除问题
标签: iphone objective-c xcode