2011-01-11 41 views
0

哪些步驟會重現該問題? 1.√[adWhirlView replaceBannerViewWith:replacement];在adwhirl中添加自定義橫幅或標籤時應用程序崩潰

預期產量是多少?你看到了什麼呢?

上replaceBanner用的UILabel作爲例子specfied Exec的錯誤訪問,它也崩潰當我添加

什麼版本的產品您使用的是我的自定義的旗幟查看?在什麼操作系統上?

的Mac OX 10.6.3和AdWhirlSDK_iPhone_2.6.2.zip

請在下面提供任何其他信息。

每當我將自定義添加到Adwhirl中,以便我的應用程序崩潰時[adWhirlView replaceBannerViewWith:replacement];請讓我知道如何解決這個問題。

- (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

回答

0

EXC_BAD_ACCESS它代表了你已經刪除了一些對象,之後我們試圖訪問它。或者你已經創建了一個autorelease對象,然後你正在訪問這個對象。在這兩種情況下,當你嘗試訪問一個沒有指向任何東西的對象時,顯示EXC_BAD_ACCESS

+0

這不是由於內存泄漏,實際上Adwhirl的實例已經存在於該類中,所以我只是用adView替換它而不是adWhirlView。 – user366584 2011-01-12 07:03:27