我在相机 OverlayView.xib 上有一个 UIActivityIndicatorView 中间。我通过反复调用[cameraPicker takePicture]来拍摄多个快照。我想在以下代码完成所有快照时显示指示器:
- (void)didTakePicture:(UIImage *)picture { //Called from picker didFinishPickingMediaWithInfo
[self.capturedImages addObject:picture];
snapsCount ++;
if (snapsCount < noOfSnaps) {
[cameraPicker takePicture];
}else {
overlayView.indicator.hidden = NO; //Not showing indicator
[overlayView.indicator startAnimating]; //Not working
}
}
谁能告诉我不显示的原因。通过以下条件,我可以在拍摄最后一张快照之前显示指标,但为什么最后不能。
if (snapsCount < noOfSnaps) {
if (snapsCount+1 == noOfSnaps) {
overlayView.indicator.hidden = NO; //Show the indicator
[overlayView.indicator startAnimating]; //Work nicely
overlayView.userMessage.text = @"Processing";
}
[cameraPicker takePicture];
}
有没有人遇到过这个问题并且知道在所有快照完成后显示指标的解决方案。
提前致谢。