這是我的代碼嘗試放入一個iAd,但它不工作。任何幫助將不勝感激,因爲我是非常新的使用Xcode。在此先感謝沒有已知的選擇器類'setAutoresizingMask'
.m文件
adView = [[ADBannerView alloc]initWithFrame:CGRectZero];
adView.frame = CGRectOffset(adView.frame, 0, -50);
adView.autoresizingMask = [NSSet setWithObject:**incompatible pointer to integer conversion assigning to 'UIViewAutoresizing' (aka enum UIViewAutoresizing)**
[ADBannerView setAutoresizingMask:UIViewAutoresizingFlexibleWidth]];**no known class for selector 'setAutoresizingMask'**
[self.view addSubview:adView];
adView.delegate=self;
self.bannerIsVisible=NO;
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
這與Xcode無關。你應該真的閱讀一本好的C書,然後*只有一個體面的Objective-C教程。您還應該閱讀被稱爲「文檔」的大量有用性。 – 2013-08-30 22:27:58