이 질문은 자주 묻는 질문입니다. uiAlertView에 다른 컨트롤을 표시하는 방법입니다. 내보기에 이미지가있는 앱이 있는데 사용자가 해당 이미지를 탭하면 확대하고 싶습니다. 그래서, 나는 확대와 함께 동일한 이미지로 uialertview에서 팝업 할 수있는 옵션이 있습니다. 잘 시도해도 올바른 해결책이 아닙니다. 당신은 내가 더 줄 경우 확인 에 겹쳐 볼 수 있다면 아래 이미지가 uialertview ...?
는, 내가 \ n \ n 메시지주고있다 여기에 내 코드
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NULL message:@"\n\n\n\n\n\n\n\n\n\n\n\n\n" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
UIImage *image = [UIImage imageNamed:@"GM00132002062125.png"];
UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
CGFloat imageHeight = 250;
CGFloat imageWidth = imageHeight * image.size.width/image.size.height;
imageView.frame = CGRectMake(floor((284 - imageWidth)/2), 47, imageWidth, imageHeight);
[alert addSubview:imageView];
[alert show];
입니다 \ n 메시지에
...이
감사
이미지 크기를 줄일 수 있습니까? – IronManGill
실제로보기 이미지는 크기가 작습니다. 사용자가 이미지를 탭하면 확대해야합니다. 팝업 이미지 크기를 줄이면 사용하지 못합니다. –
이 질문을 확인하십시오. http://stackoverflow.com/questions/2323557/image-in-uialertview –