【发布时间】:2012-08-01 05:51:13
【问题描述】:
我是 iphone 开发新手。我正在我的应用程序中实现 UIImagePickerController。当调用 didFinishPickingMediaWithInfo 委托时,即单击选择按钮时它有一些延迟。我的代码如下
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
LGViewHUD* hud = [LGViewHUD defaultHUD];
hud.activityIndicatorOn=YES;
hud.bottomText=@"Login..";
[hud showInView:picker.view];
[self performSelectorInBackground:@selector(pickerFunction:) withObject:info];
}
- (void) pickerFunction :(NSDictionary *)info
{
profilePicture.image = [info objectForKey:@"UIImagePickerControllerEditedImage"];
[imgPicker dismissModalViewControllerAnimated:YES];
}
我正在尝试在选择按钮操作上添加一个 hud,但它只是在一些延迟之后才会出现。任何人都可以建议我一种实现此实现的方法。
提前谢谢..
【问题讨论】:
-
您是哪个 iPhone 开发新手? 这个还是那个?