我有3個UIImageViews我想加載一個圖像。 對於1張圖片,這不是一個問題,但我該如何縮放到3?下面的代碼是我現在所擁有的。多個UIImageViews與UIImagePickers
-(IBAction) getPhoto:(id) sender {
UIImagePickerController * picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
[self presentModalViewController:picker animated:YES];
}
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
[picker dismissModalViewControllerAnimated:YES];
UIImage* image = [info objectForKey:UIImagePickerControllerOriginalImage];
[my_image_1 setImage:image forState:UIControlStateNormal];
}
要加載在同一圖像所有3個'UIImageView's?如果是這樣,那麼只需爲所有圖像視圖執行'setImage:forState:',而不僅僅是第一個。 – 2011-05-15 13:25:08
我想加載3個不同的圖像。所以3個按鈕來加載圖像。 - ErikS – ErikS 2011-05-15 19:41:27