Permalink
Browse files

Minor UI changes for sending reviews via email

  • Loading branch information...
1 parent 6418d77 commit 955c3499afa59f1b7ce459b5a7cefdf130609e58 Ole Zorn committed Sep 18, 2011
Showing with 5 additions and 3 deletions.
  1. +5 −3 Classes/ReviewDetailViewController.m
View
8 Classes/ReviewDetailViewController.m
@@ -51,9 +51,8 @@ - (void)viewDidLoad
template = [template stringByReplacingOccurrencesOfString:@"[[[SUBTITLE]]]" withString:reviewSubtitle];
template = [template stringByReplacingOccurrencesOfString:@"[[[CONTENT]]]" withString:review.text];
- UIBarButtonItem *sendReview = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCompose target:self action:@selector(sendReviewViaEmail)];
- self.navigationItem.rightBarButtonItem = sendReview;
- [sendReview release];
+ UIBarButtonItem *sendReviewButtonItem = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAction target:self action:@selector(sendReviewViaEmail)] autorelease];
+ self.navigationItem.rightBarButtonItem = sendReviewButtonItem;
[self.webView loadHTMLString:template baseURL:nil];
}
@@ -88,6 +87,9 @@ - (void)sendReviewViaEmail
NSString *subject = [NSString stringWithFormat:@"Review from %@", review.user];
[mailComposeViewController setMessageBody:body isHTML:YES];
[mailComposeViewController setSubject:subject];
+ if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
+ mailComposeViewController.modalPresentationStyle = UIModalPresentationFormSheet;
+ }
[self presentModalViewController:mailComposeViewController animated:YES];
}

0 comments on commit 955c349

Please sign in to comment.