什么时候,我从相机捕获图像然后它在ios7的控制台上给出错误.我首先尝试没有在代码中添加Thread.sleep(3000),但这也无法正常工作.
完成错误:快照未呈现的视图会导致空快照.确保在屏幕更新后快照或快照之前至少渲染了一次视图.
码:
public override void ViewDidLoad ()
{
base.ViewDidLoad ();
// Perform any additional setup after loading the view, typically from a nib.
PictureFromCameraButton.TouchUpInside += PictureFromCameraButton_Click;
}
private void PictureFromCameraButton_Click (object sender, EventArgs e)
{
try {
Thread.Sleep (4000);
ImagePickerController.SetSourceType(UIImagePickerControllerSourceType.Camera);
this.PresentViewController (ImagePickerController, true, null);
} catch (NotSupportedException exception) {
//Logging Exception in Flurry
FA.Flurry.LogError(exception.GetType().Name,exception.Message,
new NSError(NSError.CocoaErrorDomain,3584));
BeginInvokeOnMainThread (() => {
UIAlertView ErrorAlert = new UIAlertView ("Device unsupported", "Your device does not support this feature",
new UIAlertViewDelegate (), "OK");
ErrorAlert.Show …Run Code Online (Sandbox Code Playgroud) using(UIFont font=StyleHelper.Fonts.HelveticaNeueLTDMC_18
using(UIColor color=UIColor.Clear.FromHex(0xc7c7c7))
{
color.SetFill ();
base.DrawString (this.Placeholder, rect, font);
}
Run Code Online (Sandbox Code Playgroud)
我使用上面的代码,但它无法正常工作.