2011年3月30日 星期三

AdWhirl

I'm a newbie with integrating ads too, but I was successful in integrating adwhirl after a while. The instructions for section 6 aren't clear at all. This is what you need to do:

1) Inside your ViewController.h:

#import "AdWhirlView.h"
#import "AdWhirlDelegateProtocol.h"

2)

@interface ViewController : UIViewController <AdWhirlDelegate>{
//your code

3) Inside your ViewController.m:

above the @implementation:

#define kSampleAppKey @"yourAdWhirlKey"

4) Inside the @implementation:

#pragma mark AdWhirlDelegate methods

- (NSString *)adWhirlApplicationKey{
return kSampleAppKey;
}

- (UIViewController *)viewControllerForPresentingModalView{
return self;
}


Now for section 7:

5) Inside your ViewController.m

- (void)viewDidLoad {

[super viewDidLoad];

AdWhirlView *awView = [AdWhirlView requestAdWhirlViewWithDelegate:self];

[self.view addSubview:awView];


// that's it!

沒有留言:

張貼留言