Hi i am new here and also a noob with Xcode please help. I am trying to make Imagepickercontroller but i am having trouble with one error and don't know how to solve it.
Viewcontroller.h
@interface ViewController : UIViewController<UIImagePickerControllerDelegate> {
IBOutlet UIButton *button;
IBOutlet UIImageView *image;
UIImagePickerController *imagepicker;
}
- (IBAction)change:(id)sender;
@end
Viewcontroller.m
@interface ViewController ()
@end
@implementation ViewController
-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *mytouch = [[event allTouches] anyObject];
button.center = [mytouch locationInView:self.view];
}
- (void)viewDidLoad
{
[super viewDidLoad];
imagepicker = [[UIImagePickerController alloc] init];
[imagepicker setSourceType:UIImagePickerControllerSourceTypePhotoLibrary];
[imagepicker setAllowsEditing:YES];
}
- (IBAction)change:(id)sender
{
[self presentViewController:imagepicker animated:YES completion:NO];
}
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
[UIImage(setimage:)image];
[self dismissViewControllerAnimated:YES completion:NO];
}
@end
Expected identifier [UIImage(setimage:)image];