0
因此,在YouTube上觀看Geeky Lemon的教程(https://www.youtube.com/watch?v=0NkgmhpJovM&list=UU6-UA1FoMnbO2LCLWPCM9aA&index=27)後,您將瞭解如何在您的應用中實施iAds。我的問題是,當我完成所有代碼並嘗試將AdBannerView連接到代理時,出於某種原因在故事板中選擇AdBannerView時,我可以在右側看到代理連接,但是沒有連接它的方式。 這是我的代碼。 我.h文件中:iAd在Xcode中,將AdBannerView連接到委託?
#import <iAd/iAd.h>
#import <UIKit/UIKit.h>
@interface FirstViewController : UIViewController <MFMessageComposeViewControllerDelegate, ADBannerViewDelegate> {
}
我.m文件:
#import "FirstViewController.h"
@interface FirstViewController()
@end
@implementation FirstViewController
- (void) bannerViewDidLoadAd:(ADBannerView *)banner{
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1];
[banner setAlpha:1];
[UIView commitAnimations];
}
- (void) bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error {
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1];
[banner setAlpha:0];
[UIView commitAnimations];
}
所以回顧一下,我需要知道如何連接我的旗幟,以文件的所有者,而使用故事板? 請你幫忙,任何幫助都非常感謝。 謝謝先進。
非常感謝! – 2013-04-04 12:11:01