0
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Congratulations" message:message delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"View", nil];
UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(110, 100, 80, 80)];
NSString *imagePath = [NSString stringWithFormat:@"%@", [Array objectAtIndex:x]];
UIImage *bkgImg = [UIImage imageWithContentsOfFile: [[NSBundle mainBundle] pathForResource:imagePath ofType:@"png"]];
imageView.image = bkgImg;
[bkgImg release];
[alert addSubview:imageView];
[imageView release];
[alert show];
[alert release];
這是我用來創建警報視圖的代碼。目前,我已經設置了它,如果用戶按下其中一個按鈕,它將加載一個新的視圖控制器。它工作正常,直到我添加到UIAlertView子視圖。現在,只要它動畫到新屏幕,它就會使程序崩潰。我相當新的iPhone開發和任何幫助,將不勝感激。UIAlertView與子視圖動畫到新視圖崩潰應用程序
你能發佈崩潰日誌嗎?它可能包含幫助查找崩潰來源的信息。 – 2010-05-31 06:58:20