From 1fc4057384f69a9ecb8da52340ade156a50c5490 Mon Sep 17 00:00:00 2001 From: Sami Samhuri Date: Fri, 22 May 2015 00:00:11 -0400 Subject: [PATCH] don't deselect posts on iPad --- Blog/PostsViewController.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Blog/PostsViewController.m b/Blog/PostsViewController.m index 767ef3b..e5f1707 100644 --- a/Blog/PostsViewController.m +++ b/Blog/PostsViewController.m @@ -198,12 +198,13 @@ static const NSUInteger SectionPublished = 1; [super viewWillAppear:animated]; [self setupBlogStatusTimer]; [self requestStatusWithCaching:YES]; + BOOL isPhone = [UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPhone; + if (isPhone && self.tableView.indexPathForSelectedRow) { + [self.tableView deselectRowAtIndexPath:self.tableView.indexPathForSelectedRow animated:YES]; + } if (!self.postCollections) { [self requestPostsWithCaching:YES]; } - if (self.tableView.indexPathForSelectedRow) { - [self.tableView deselectRowAtIndexPath:self.tableView.indexPathForSelectedRow animated:YES]; - } [self setupKeyboardNotifications]; }