所以我正在将用户的图像上传到我的服务器。一旦用户在中选择图像,我就有以下代码UIImagePickerController
:
public void Picked(object sender, UIImagePickerMediaPickedEventArgs e)
{
Console.WriteLine ("done picking");
picker.DismissViewController (false, null);
image.Image = e.Info [UIImagePickerController.OriginalImage] as UIImage;
UploadImage (); //call the upload function
}
这有效,除了我希望选择器在UploadImage();
调用之前被解散,但直到上传完成后才会被解散。
如何在选择图像后立即关闭选择器视图?