私は UIAlertView にいくつかのアイコンを表示して、その使用法を説明するアプリに取り組んでいます。私はそれを使用してそれを行いました:
UIAlertView *helpAlert = [[UIAlertView alloc] initWithTitle:@"The button:\n\n is used to do... \n\n " message:@"" delegate:self cancelButtonTitle:@"OK" otherButtonTitles: nil];
UIImageView *imageView1 = [[UIImageView alloc] initWithFrame:CGRectMake(20, 55, 40, 40)];
NSString *path1 = [[NSString alloc] initWithString:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"bottle_w_40.png"]];
UIImage *bkgImg1 = [[UIImage alloc] initWithContentsOfFile:path1];
[imageView1 setImage:bkgImg1];
[bkgImg1 release];
[path1 release];
[helpAlert addSubview:imageView1];
[imageView1 release];
[helpAlert show];
[helpAlert release];
シミュレーターと私のiPhone 3gs(Retinaディスプレイなし)でうまく機能します。私の男は網膜の動作についてです。画像の位置が違う?CGRectMake に scaleFactor を使用する必要がありますか、または UIAlertview の位置は絶対的ですか?