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