0

尝试使用以下代码在应用中添加 iAd 横幅视图:

adView = [[ADBannerView alloc] initWithFrame:CGRectZero];
adView.frame = CGRectOffset(adView.frame, 0, -50);
adView.requiredContentSizeIdentifiers = [NSSet setWithObject:ADBannerContentSizeIdentifier320x50];
adView.currentContentSizeIdentifier = ADBannerContentSizeIdentifier320x50;
adView.backgroundColor = [UIColor clearColor];
adView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleTopMargin;

它给 Apple Mach-O 链接器错误

Undefined symbols for architecture armv6:
"_CGRectOffset", referenced from:
  -[ContainerViewController viewDidLoad] in ContainerViewController.o
"_CGRectZero", referenced from:
  -[ContainerViewController viewDidLoad] in ContainerViewController.o
ld: symbol(s) not found for architecture armv6
clang: error: linker command failed with exit code 1 (use -v to see invocation)

如果有人可以指导需要修复什么来摆脱这些错误。

感谢帮助。

4

1 回答 1

1

确保您正在链接 CoreGraphics 框架。

于 2012-09-04T17:56:50.753 回答