2012-05-23 41 views

回答

1

使用本

UIAlertView *successAlert = [[UIAlertView alloc] initWithTitle:title message:message delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; 

    UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(220, 10, 40, 40)]; 

    NSString *path = [[NSString alloc] initWithString:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"smile.png"]]; 
    UIImage *bkgImg = [[UIImage alloc] initWithContentsOfFile:path]; 
    [imageView setImage:bkgImg]; 
    [bkgImg release]; 
    [path release]; 

    [successAlert addSubview:imageView]; 
    [imageView release]; 

    [successAlert show]; 
    [successAlert release]; 

複製形式here

+0

感謝。它正在工作...... – Trup