I have a UIActivityIndicatorView middle on camera OverlayView.xib. I am taking multiple snap by calling [cameraPicker takePicture] repeatedly. I want to show the indicator when all snaps taking done by the bellow code:
- (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
}
}
Can anyone tell me the reason why not showing. I can show the indicator before taking the last snap by the following condition, but why not at last.
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];
}
Is there anyone faced the problem and know the solution to show the indicator after all snap taking done.
Thanks in advance.