非法配置“帧大小不是其所需内容大小的成员” iAd 设置?
我在那里没有看到该方法...我只是将 iAd 横幅使用 xcode 放在深入表教程的顶部。我在顶部和底部都尝试过。
它似乎可以在模拟器中编译并运行...但我收到此错误。我正在尝试将 iAds 添加到表格视图应用程序。任何建议将不胜感激?
-(void) bannerViewDidLoadAd:(ADBannerView *)banner{
if (!self.bannerIsVisible)
{
[UIView beginAnimations:@"animateAdBannerOn" context:NULL];
banner.frame = CGRectOffset(banner.frame, 0, -banner.frame.size.height);
[UIView commitAnimations];
self.bannerIsVisible = YES;
}}
-(void) bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error {
if (self.bannerIsVisible)
{
[UIView beginAnimations:@"animateAdBannerOff" context:NULL];
banner.frame = CGRectOffset(banner.frame, 0, banner.frame.size.height);
[UIView commitAnimations];
self.bannerIsVisible = NO;
}}
I don't see that method in there... I just put the iAd banner in using xcode at the top of a drill down table tutorial. I tried it at the top and at the bottom.
It seems to compile and run in the simulator... but I get this error. I'm trying to add iAds to a table view app. Any suggestions would be greatly appreciated?
-(void) bannerViewDidLoadAd:(ADBannerView *)banner{
if (!self.bannerIsVisible)
{
[UIView beginAnimations:@"animateAdBannerOn" context:NULL];
banner.frame = CGRectOffset(banner.frame, 0, -banner.frame.size.height);
[UIView commitAnimations];
self.bannerIsVisible = YES;
}}
-(void) bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error {
if (self.bannerIsVisible)
{
[UIView beginAnimations:@"animateAdBannerOff" context:NULL];
banner.frame = CGRectOffset(banner.frame, 0, banner.frame.size.height);
[UIView commitAnimations];
self.bannerIsVisible = NO;
}}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当我尝试将 ADBannerView 添加到笔尖中的 TableView 时,我在 Xcode 4.2.1 中遇到了完全相同的问题。它看起来像是来自 Xcode 或 iAd 框架的错误。
这可以通过以下步骤解决:
I had the exact same issue in Xcode 4.2.1 when trying to add ADBannerView to TableView in a nib. It looks like a bug from Xcode or iAd framework.
This can be walkaround by following steps: