Я пишу приложение, в котором пользователь может выбрать фотографию в библиотеке, отправить на сервер.
Это мой код
-(IBAction)btnTakePictureClicked {
UIImagePickerController* picker = [[UIImagePickerController alloc] init];
picker.delegate=self;
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
[self presentModalViewController:picker animated:YES];
[picker release];
}
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo{
[picker.parentViewController dismissModalViewControllerAnimated:YES];
self.imgTemp = image;
// Where should these lines be?
Send* send = [[Send alloc] initWithNibName:@"Send Email" bundle:nil];
[self presentModalViewController:send animated:YES];
[send release];
}
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker {
[picker.parentViewController dismissModalViewControllerAnimated:YES];
}
Я ожидал, что после выбора фотографии она изменится на страницу отправки. Но это все еще обратно на домашнюю страницу.
Где должны быть эти строки?
Send* send = [[Send alloc] initWithNibName:@"Send Email" bundle:nil];
[self presentModalViewController:send animated:YES];
[send release];