Skip to content

Commit

Permalink
Formatting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
romaonthego committed Nov 5, 2013
1 parent ae6e693 commit a06fc13
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions REComposeViewController/REComposeViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -328,30 +328,30 @@ - (void)postButtonPressed

- (void)didTapAttachmentView:(id)sender
{
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
// If our device has a cmera, we want to take a picture, otherwise we just pick from the library
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
// If our device has a cmera, we want to take a picture, otherwise we just pick from the library
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
[picker setSourceType:UIImagePickerControllerSourceTypeCamera];
} else {
} else {
[picker setSourceType:UIImagePickerControllerSourceTypePhotoLibrary];
}
picker.delegate = self;
[self presentViewController:picker animated:YES completion:nil];
}

picker.delegate = self;
[self presentViewController:picker animated:YES completion:nil];
}

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
[self setAttachmentImage:[info objectForKey:UIImagePickerControllerOriginalImage]];
self.userUpdatedAttachment = YES;
[picker dismissViewControllerAnimated:YES completion:nil];
[self.sheetView.textView becomeFirstResponder];
[self setAttachmentImage:[info objectForKey:UIImagePickerControllerOriginalImage]];
self.userUpdatedAttachment = YES;
[picker dismissViewControllerAnimated:YES completion:nil];
[self.sheetView.textView becomeFirstResponder];
}

- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker
{
[picker dismissViewControllerAnimated:YES completion:nil];
[self.sheetView.textView becomeFirstResponder];
[picker dismissViewControllerAnimated:YES completion:nil];
[self.sheetView.textView becomeFirstResponder];
}

#pragma mark -
Expand Down

0 comments on commit a06fc13

Please sign in to comment.