我想要做的按鈕CLCK以下的事情:「EXC_BAD_ACCESS」我該如何解決這個問題?
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
if (buttonIndex == 0)
{
if (QuestionMutableArray==nil) {
[self testIterator];
}
else
{
[myMutableArray release];
[myDictionary release];
[self dismissModalViewControllerAnimated:YES];
//[self release];
}
}
}
這段代碼可以追溯到parentView控制器......當我再次來此的tableView後,我想重裝我的tableView新的NSMutableArray。如何用dismissModalViewController清空我的集合(NSMutableArray或字典)?
- (無效)alertView:(UIAlertView中*)alertView clickedButtonAtIndex:(NSInteger的)buttonIndex { 如果(buttonIndex == 0){ \t \t \t \t [自dismissModalViewControllerAnimated:YES]; \t \t \t \t \t [QuestionMutableArray removeAllObjects]; \t \t \t \t XmlManipulatorObject = [[xmlManipulator alloc] init]; \t \t QuestionMutableArray = [[XmlManipulatorObject ReadXml] retain]; \t \t [self.tableView release]; \t \t \t \t }}我照你說的從Array.But刪除所有對象我不是剛剛從那裏我來到back.What可能是解決讓我List.It的加載新的數據已經試過? – 2011-04-27 19:21:32