|
@@ -164,38 +164,34 @@
|
|
|
#pragma mark - Accessor
|
|
|
|
|
|
- (void)updateTakePhotoButtonStatus {
|
|
|
- UIImage* img = self.isRecording ? [UIImage loadNamed:@"btn-stop-recording"] : [UIImage loadNamed:@"take-photo-btn"];
|
|
|
- if (!NSThread.isMainThread) {
|
|
|
- dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
- [self.controller.takePhotoButton setImage:img forState:UIControlStateNormal];
|
|
|
- });
|
|
|
- } else {
|
|
|
+ dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
+ UIImage* img = self.isRecording ? [UIImage loadNamed:@"btn-stop-recording"] : [UIImage loadNamed:@"take-photo-btn"];
|
|
|
[self.controller.takePhotoButton setImage:img forState:UIControlStateNormal];
|
|
|
- }
|
|
|
-
|
|
|
- if (!self.isRecording) {
|
|
|
- [self.controller.timerLabel updateWith:0];
|
|
|
- self.controller.flashButton.hidden = NO;
|
|
|
- self.controller.discardPhotoButton.hidden = NO;
|
|
|
- self.controller.savePhotoButton.hidden = NO;
|
|
|
- if (self.modeIndex == SDK_CAPTURE_MODE_PANORAMA || self.modeIndex == SDK_CAPTURE_MODE_INTELLEGENCE_PANORAMA) {
|
|
|
- self.controller.switchButton.hidden = YES;
|
|
|
+
|
|
|
+ if (!self.isRecording) {
|
|
|
+ [self.controller.timerLabel updateWith:0];
|
|
|
+ self.controller.flashButton.hidden = NO;
|
|
|
+ self.controller.discardPhotoButton.hidden = NO;
|
|
|
+ self.controller.savePhotoButton.hidden = NO;
|
|
|
+ if (self.modeIndex == SDK_CAPTURE_MODE_PANORAMA || self.modeIndex == SDK_CAPTURE_MODE_INTELLEGENCE_PANORAMA) {
|
|
|
+ self.controller.switchButton.hidden = YES;
|
|
|
+ } else {
|
|
|
+ self.controller.switchButton.hidden = NO;
|
|
|
+ }
|
|
|
+ self.controller.modeList.hidden = NO;
|
|
|
+ self.controller.ablumImageView.hidden = NO;
|
|
|
} else {
|
|
|
- self.controller.switchButton.hidden = NO;
|
|
|
+ self.controller.flashButton.hidden = YES;
|
|
|
+ self.controller.discardPhotoButton.hidden = YES;
|
|
|
+ self.controller.savePhotoButton.hidden = YES;
|
|
|
+ self.controller.switchButton.hidden = YES;
|
|
|
+ self.controller.backButton.hidden = YES;
|
|
|
+ self.controller.modeList.hidden = YES;
|
|
|
+ self.controller.ablumImageView.hidden = YES;
|
|
|
+ self.controller.numberOfImagesLabel.hidden = YES;
|
|
|
+
|
|
|
}
|
|
|
- self.controller.modeList.hidden = NO;
|
|
|
- self.controller.ablumImageView.hidden = NO;
|
|
|
- } else {
|
|
|
- self.controller.flashButton.hidden = YES;
|
|
|
- self.controller.discardPhotoButton.hidden = YES;
|
|
|
- self.controller.savePhotoButton.hidden = YES;
|
|
|
- self.controller.switchButton.hidden = YES;
|
|
|
- self.controller.backButton.hidden = YES;
|
|
|
- self.controller.modeList.hidden = YES;
|
|
|
- self.controller.ablumImageView.hidden = YES;
|
|
|
- self.controller.numberOfImagesLabel.hidden = YES;
|
|
|
-
|
|
|
- }
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
|