Skip to content

Commit

Permalink
Improve the code, and make it consistent.
Browse files Browse the repository at this point in the history
  • Loading branch information
krider2010 committed Dec 22, 2015
1 parent c1c1716 commit 8b2ce0c
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions GMImagePicker/GMImagePickerController.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ - (id)init
_autoDisableDoneButton = YES;
_allowsMultipleSelection = YES;
_confirmSingleSelection = NO;
_confirmSingleSelectionPrompt = nil;
_showCameraButton = NO;

// Grid configuration:
Expand Down Expand Up @@ -148,12 +147,7 @@ - (void)selectAsset:(PHAsset *)asset

if (!self.allowsMultipleSelection) {
if (self.confirmSingleSelection) {
NSString *message;
if (self.confirmSingleSelectionPrompt != nil) {
message = self.confirmSingleSelectionPrompt;
} else {
message = [NSString stringWithFormat:NSLocalizedStringFromTableInBundle(@"picker.confirm.message", @"GMImagePicker", [NSBundle bundleForClass:GMImagePickerController.class], @"Do you want to select the image you tapped on?")];
}
NSString *message = self.confirmSingleSelectionPrompt ? self.confirmSingleSelectionPrompt : [NSString stringWithFormat:NSLocalizedStringFromTableInBundle(@"picker.confirm.message", @"GMImagePicker", [NSBundle bundleForClass:GMImagePickerController.class], @"Do you want to select the image you tapped on?")];

[[[UIAlertView alloc] initWithTitle:[NSString stringWithFormat:NSLocalizedStringFromTableInBundle(@"picker.confirm.title", @"GMImagePicker", [NSBundle bundleForClass:GMImagePickerController.class], @"Are You Sure?")]
message:message
Expand Down

0 comments on commit 8b2ce0c

Please sign in to comment.