My code look like this as described in the getting started guide see link: http://help.mopub.com/customer/portal/articles/82831-start-guide
- (void)viewDidLoad {
self.adView = [[MPAdView alloc] initWithAdUnitId:@"xxx" size:MOPUB_BANNER_SIZE];
self.adView.delegate = self;
self.adView.frame = CGRectMake(0, self.view.bounds.size.height - MOPUB_BANNER_SIZE.height, MOPUB_BANNER_SIZE.width, MOPUB_BANNER_SIZE.height);
self.adView.keywords = keywords;
[self.view addSubview:self.adView];
[self.adView loadAd];
[super viewDidLoad];
}
The problem is when I start the app, it will start the viewDidLoad function which will load the ad. When the network is very slow or not existing the loading of the ad will freeze the executing of the app for about 20 sec. and this is not acceptable behavior. Is there a solution for this ?