我正在阅读很多关于此的帖子,但我无法解决我的问题... 我试图发送一个图像从一个ViewController与选择器...到另一个ViewController但图像没有出现......从UIImagePickerController传递图像到另一个ViewController
我有2个VC:
HomeViewController.h:
#import <UIKit/UIKit.h>
#import "PhotoViewController.h"
@interface QuizTypeViewController : UIViewController <UIImagePickerControllerDelegate, UINavigationControllerDelegate>
- (IBAction)photo:(id)sender;
@end
HomeViewController.m(我得到正确的图像,我要去发布只是SEGUE代码)
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
UIImage *chosenImage = info[UIImagePickerControllerEditedImage];
PhotoViewController *controller = [PhotoViewController new];
controller.imageView.image = chosenImage;
[picker dismissViewControllerAnimated:YES completion:NULL];
[self performSegueWithIdentifier:@"viewPhoto" sender:self];
}
PhotoViewController.h
#import <UIKit/UIKit.h>
@interface PhotoViewController : UIViewController
@property (strong, nonatomic) IBOutlet UIImageView *imageView;
@end
PhotoViewController.m - 没什么......
我在做什么错了?我不知道...
你有没有合成的ImageView的? – Ramdy
@Ramdy在带有LLVM的Xcode 5中,不需要合成等等。 – rckoenes
那么,我们不需要使用合成?@rckoenes – Ramdy