Application crashes on adding custom banner or label in adwhirl
What steps will reproduce the problem? 1.√ [a开发者_如何学GodWhirlView replaceBannerViewWith:replacement];
What is the expected output? What do you see instead?
Exec Bad Access on replaceBanner with UILabel as specfied in example, it also crashes when I add my custom banner View
What version of the product are you using? On what operating system?
Mac OX 10.6.3 and AdWhirlSDK_iPhone_2.6.2.zip
Please provide any additional information below.
Whenever I integrate my custom add in Adwhirl so my application crashes [adWhirlView replaceBannerViewWith:replacement]; please let me know how to overcome this issue.
- (void)performEvent:(AdWhirlView *)adWhirlView {
// replace banner content
UILabel *replacement = [[UILabel alloc] initWithFrame:kAdWhirlViewDefaultFrame];
replacement.backgroundColor = [UIColor blackColor];
replacement.textColor = [UIColor whiteColor];
replacement.textAlignment = UITextAlignmentCenter;
replacement.text = [NSString stringWithFormat:@"Event performed, view %x", adWhirlView];
[adWhirlView replaceBannerViewWith:replacement];
[replacement release];
}
http://code.google.com/p/adwhirl/wiki/CustomEvents
EXC_BAD_ACCESS it represents that you have removed some objects and after that you trying to access it. OR you have created an autorelease objects and you are accessing the object afterwards. In both the cases the EXC_BAD_ACCESS is shown when you try to access an object which is not pointing to anything
精彩评论