iPhone 应用程序中的 iAd“ADBannerContentSizeIdentifier320x50”未声明(在此函数中首次使用)”
我在 iphone 4.0 应用程序中使用 iAd,但在视图上添加 ADBannerView 后,当我尝试使用以下代码设置 ADBannerView 属性时:-
adViewTemp.requiredContentSizes= [NSSet setWithObject:ADBannerContentSizeIdentifier320x50];
我收到以下错误消息:-
错误: 'ADBannerContentSizeIdentifier320x50' 未声明(在此首次使用 函数)
,我还检查了苹果“iAdSuite”提供的示例,我在此示例中遇到了相同的错误。 那么任何人都可以建议我如何解决这个问题。 谢谢
I am using iAd in my iphone 4.0 application but after adding the ADBannerView on view and when i try to set the ADBannerView properties using below code :-
adViewTemp.requiredContentSizes= [NSSet setWithObject:ADBannerContentSizeIdentifier320x50];
I get the below error message:-
error:
'ADBannerContentSizeIdentifier320x50'
undeclared (first use in this
function)
and i also check the sample provided by apple "iAdSuite" i get the same error in this sample.
so can any one suggest how i solve this issue.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
确保您已导入 iAds Franework 并包含导入语句。
Make sure you have imported the iAds Franework and included the import statement.
不仅仅是标题,还添加框架。在左侧的 Frameworks 中,单击 cmd,选择“添加现有框架”,选择 iAd 框架。
Not just the header, add the Framework. In Frameworks on the left, cmd-click, choose Add Existing Frameworks, select the iAd framework.