【发布时间】:2023-03-03 02:09:01
【问题描述】:
我正在编写一个应用程序,用户可以在库中选择一张照片,发送到服务器。 这是我的代码
-(IBAction)btnTakePictureClicked { UIImagePickerController* 选择器 = [[UIImagePickerController alloc] init]; 选择器.delegate=自己; picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; [self presentModalViewController:picker animated:YES]; [选择器发布]; } - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo{ [picker.parentViewControllerdismissModalViewControllerAnimated:YES]; self.imgTemp = 图像; // 这些行应该在哪里? Send* send = [[Send alloc] initWithNibName:@"Send Email" bundle:nil]; [self presentModalViewController:发送动画:YES]; [发送发布]; } - (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker { [picker.parentViewControllerdismissModalViewControllerAnimated:YES]; }我希望在挑选照片后,它会变为发送页面。但是,它还是回到了首页。
这些行应该在哪里?
Send* send = [[Send alloc] initWithNibName:@"Send Email" bundle:nil]; [self presentModalViewController:发送动画:YES]; [发送发布];【问题讨论】:
标签: iphone objective-c ios xcode