X-Git-Url: http://git.rot13.org/?p=zxing.git;a=blobdiff_plain;f=iphone%2FClasses%2FDecoderViewController.m;h=73cb07501f74068c1c905dd7f0425ee8ce8d1764;hp=31037e20627b8a748ac9b0fc74c0c185c50f9443;hb=ca9d7b07d124cc454c38b984677c511476fd8d9b;hpb=2eff3de458797ee5b6cf17a714894df2aa9e7054 diff --git a/iphone/Classes/DecoderViewController.m b/iphone/Classes/DecoderViewController.m index 31037e20..73cb0750 100644 --- a/iphone/Classes/DecoderViewController.m +++ b/iphone/Classes/DecoderViewController.m @@ -158,7 +158,9 @@ } - (void)showMessage:(NSString *)message { - NSLog(message); +#ifdef DEBUG + NSLog(@"Showing message '%@'", message); +#endif self.messageView.text = message; [self.messageView sizeToFit]; } @@ -182,7 +184,9 @@ self.result = [ParsedResult parsedResultForString:resultString]; [self showMessage:[self.result stringForDisplay]]; self.actions = self.result.actions; +#ifdef DEBUG NSLog(@"result has %d actions", actions ? 0 : actions.count); +#endif [self updateToolbar]; } @@ -207,6 +211,7 @@ didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo { +#ifdef DEBUG NSLog(@"picked image size = (%f, %f)", image.size.width, image.size.height); if (editingInfo) { UIImage *originalImage = [editingInfo objectForKey:UIImagePickerControllerOriginalImage]; @@ -219,6 +224,7 @@ NSLog(@"crop rect = (%f, %f) x (%f, %f)", CGRectGetMinX(cropRect), CGRectGetMinY(cropRect), CGRectGetWidth(cropRect), CGRectGetHeight(cropRect)); } } +#endif [[picker parentViewController] dismissModalViewControllerAnimated:YES]; [image retain]; @@ -269,13 +275,17 @@ if (self.actions.count == 1) { ResultAction *action = [self.actions lastObject]; +#ifdef DEBUG NSLog(@"Result has the single action, (%@) '%@', performing it", NSStringFromClass([action class]), [action title]); +#endif [self performSelector:@selector(confirmAndPerformAction:) withObject:action afterDelay:0.0]; } else { +#ifdef DEBUG NSLog(@"Result has multiple actions, popping up an action sheet"); +#endif UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithFrame:self.view.bounds]; for (ResultAction *action in self.actions) {