{"action":"created","comment":{"url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/pulls/comments/35317987","id":35317987,"diff_hunk":"@@ -145,6 +189,209 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath\n     }\n }\n \n+\n+#pragma mark - Private cell configuration methods\n+\n+- (NSString *)cellIdentifierForIndexPath:(NSIndexPath *)indexPath\n+{\n+    NSString *identifier = @\"\";\n+    \n+    StatsSection statsSection = [self statsSectionForTableViewSection:indexPath.section];\n+    \n+    switch (statsSection) {\n+        case StatsSectionInsightsAllTime:\n+            if (indexPath.row == 0) {\n+                identifier = InsightsTableSectionHeaderCellIdentifier;\n+            } else {\n+                identifier = self.traitCollection.userInterfaceIdiom == UIUserInterfaceIdiomPad ? InsightsTableAllTimeDetailsiPadCellIdentifier : InsightsTableAllTimeDetailsCellIdentifier;","path":"WordPressCom-Stats-iOS/InsightsTableViewController.m","position":261,"original_position":261,"commit_id":"b3025e7a3386828d2ccdd9dd53938b368e2bdd13","original_commit_id":"b3025e7a3386828d2ccdd9dd53938b368e2bdd13","user":{"login":"astralbodies","id":373903,"avatar_url":"https://avatars.githubusercontent.com/u/373903?v=3","gravatar_id":"","url":"https://api.github.com/users/astralbodies","html_url":"https://github.com/astralbodies","followers_url":"https://api.github.com/users/astralbodies/followers","following_url":"https://api.github.com/users/astralbodies/following{/other_user}","gists_url":"https://api.github.com/users/astralbodies/gists{/gist_id}","starred_url":"https://api.github.com/users/astralbodies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astralbodies/subscriptions","organizations_url":"https://api.github.com/users/astralbodies/orgs","repos_url":"https://api.github.com/users/astralbodies/repos","events_url":"https://api.github.com/users/astralbodies/events{/privacy}","received_events_url":"https://api.github.com/users/astralbodies/received_events","type":"User","site_admin":false},"body":"I just realized that even though iOS 7 supports size classes it's ONLY through IB and not in code. This crashes on iOS 7.  Switching back to IS_IPAD for now.","created_at":"2015-07-23T12:59:52Z","updated_at":"2015-07-23T12:59:52Z","html_url":"https://github.com/wordpress-mobile/WordPressCom-Stats-iOS/pull/286#discussion_r35317987","pull_request_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/pulls/286","_links":{"self":{"href":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/pulls/comments/35317987"},"html":{"href":"https://github.com/wordpress-mobile/WordPressCom-Stats-iOS/pull/286#discussion_r35317987"},"pull_request":{"href":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/pulls/286"}}},"pull_request":{"url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/pulls/286","id":40605114,"html_url":"https://github.com/wordpress-mobile/WordPressCom-Stats-iOS/pull/286","diff_url":"https://github.com/wordpress-mobile/WordPressCom-Stats-iOS/pull/286.diff","patch_url":"https://github.com/wordpress-mobile/WordPressCom-Stats-iOS/pull/286.patch","issue_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/issues/286","number":286,"state":"open","locked":false,"title":"Implement Insights 2x2 grid","user":{"login":"astralbodies","id":373903,"avatar_url":"https://avatars.githubusercontent.com/u/373903?v=3","gravatar_id":"","url":"https://api.github.com/users/astralbodies","html_url":"https://github.com/astralbodies","followers_url":"https://api.github.com/users/astralbodies/followers","following_url":"https://api.github.com/users/astralbodies/following{/other_user}","gists_url":"https://api.github.com/users/astralbodies/gists{/gist_id}","starred_url":"https://api.github.com/users/astralbodies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astralbodies/subscriptions","organizations_url":"https://api.github.com/users/astralbodies/orgs","repos_url":"https://api.github.com/users/astralbodies/repos","events_url":"https://api.github.com/users/astralbodies/events{/privacy}","received_events_url":"https://api.github.com/users/astralbodies/received_events","type":"User","site_admin":false},"body":"Closes #264 \r\n\r\nOn iPhones, show All Time and Today's Stats on Insights in a 2x2 grid rather than a 1x4.\r\n\r\nI had a refactor a bunch of the storyboard to move from static cells to dynamic prototypes. This helps pave the way for #257 to be completed easier. I wanted iPhone portrait to be the only size class that got the 2x2 grid but I ran into problems. I time-boxed the solution and the next best solution is 2x2 for all iPhone orientations.\r\n\r\nTo test, launch StatsDemo after putting a current OAuth2 token and site ID in WPSViewController. Or just use the latest StatsDemo internal release.\r\n\r\n![ios simulator screen shot jul 22 2015 2 39 11 pm](https://cloud.githubusercontent.com/assets/373903/8835801/4c23de72-3082-11e5-8680-60251bf07810.png)\r\n\r\nNeeds Review: @jancavan, @jleandroperez","created_at":"2015-07-22T19:59:36Z","updated_at":"2015-07-23T12:59:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"01e7ccf6ce60b3fd49eaf6e6413a607247da9aeb","assignee":null,"milestone":{"url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/milestones/8","html_url":"https://github.com/wordpress-mobile/WordPressCom-Stats-iOS/milestones/Release%204","labels_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/milestones/8/labels","id":1150022,"number":8,"title":"Release 4","description":"Aimed for WPiOS 5.5","creator":{"login":"astralbodies","id":373903,"avatar_url":"https://avatars.githubusercontent.com/u/373903?v=3","gravatar_id":"","url":"https://api.github.com/users/astralbodies","html_url":"https://github.com/astralbodies","followers_url":"https://api.github.com/users/astralbodies/followers","following_url":"https://api.github.com/users/astralbodies/following{/other_user}","gists_url":"https://api.github.com/users/astralbodies/gists{/gist_id}","starred_url":"https://api.github.com/users/astralbodies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astralbodies/subscriptions","organizations_url":"https://api.github.com/users/astralbodies/orgs","repos_url":"https://api.github.com/users/astralbodies/repos","events_url":"https://api.github.com/users/astralbodies/events{/privacy}","received_events_url":"https://api.github.com/users/astralbodies/received_events","type":"User","site_admin":false},"open_issues":25,"closed_issues":0,"state":"open","created_at":"2015-06-04T19:45:09Z","updated_at":"2015-07-22T19:59:36Z","due_on":"2015-07-10T05:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/pulls/286/commits","review_comments_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/pulls/286/comments","review_comment_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/issues/286/comments","statuses_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/statuses/b3025e7a3386828d2ccdd9dd53938b368e2bdd13","head":{"label":"wordpress-mobile:issue/264-new-layout","ref":"issue/264-new-layout","sha":"b3025e7a3386828d2ccdd9dd53938b368e2bdd13","user":{"login":"wordpress-mobile","id":1306301,"avatar_url":"https://avatars.githubusercontent.com/u/1306301?v=3","gravatar_id":"","url":"https://api.github.com/users/wordpress-mobile","html_url":"https://github.com/wordpress-mobile","followers_url":"https://api.github.com/users/wordpress-mobile/followers","following_url":"https://api.github.com/users/wordpress-mobile/following{/other_user}","gists_url":"https://api.github.com/users/wordpress-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/wordpress-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wordpress-mobile/subscriptions","organizations_url":"https://api.github.com/users/wordpress-mobile/orgs","repos_url":"https://api.github.com/users/wordpress-mobile/repos","events_url":"https://api.github.com/users/wordpress-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/wordpress-mobile/received_events","type":"Organization","site_admin":false},"repo":{"id":19698391,"name":"WordPressCom-Stats-iOS","full_name":"wordpress-mobile/WordPressCom-Stats-iOS","owner":{"login":"wordpress-mobile","id":1306301,"avatar_url":"https://avatars.githubusercontent.com/u/1306301?v=3","gravatar_id":"","url":"https://api.github.com/users/wordpress-mobile","html_url":"https://github.com/wordpress-mobile","followers_url":"https://api.github.com/users/wordpress-mobile/followers","following_url":"https://api.github.com/users/wordpress-mobile/following{/other_user}","gists_url":"https://api.github.com/users/wordpress-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/wordpress-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wordpress-mobile/subscriptions","organizations_url":"https://api.github.com/users/wordpress-mobile/orgs","repos_url":"https://api.github.com/users/wordpress-mobile/repos","events_url":"https://api.github.com/users/wordpress-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/wordpress-mobile/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wordpress-mobile/WordPressCom-Stats-iOS","description":"Reusable component for displaying WordPress.com site stats in an iOS application","fork":false,"url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS","forks_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/forks","keys_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/teams","hooks_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/hooks","issue_events_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/issues/events{/number}","events_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/events","assignees_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/assignees{/user}","branches_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/branches{/branch}","tags_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/tags","blobs_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/git/refs{/sha}","trees_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/statuses/{sha}","languages_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/languages","stargazers_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/stargazers","contributors_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/contributors","subscribers_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/subscribers","subscription_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/subscription","commits_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/commits{/sha}","git_commits_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/git/commits{/sha}","comments_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/comments{/number}","issue_comment_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/issues/comments{/number}","contents_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/contents/{+path}","compare_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/merges","archive_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/downloads","issues_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/issues{/number}","pulls_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/pulls{/number}","milestones_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/milestones{/number}","notifications_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/labels{/name}","releases_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/releases{/id}","created_at":"2014-05-12T12:48:07Z","updated_at":"2015-05-06T23:00:07Z","pushed_at":"2015-07-22T23:30:16Z","git_url":"git://github.com/wordpress-mobile/WordPressCom-Stats-iOS.git","ssh_url":"git@github.com:wordpress-mobile/WordPressCom-Stats-iOS.git","clone_url":"https://github.com/wordpress-mobile/WordPressCom-Stats-iOS.git","svn_url":"https://github.com/wordpress-mobile/WordPressCom-Stats-iOS","homepage":null,"size":3456,"stargazers_count":7,"watchers_count":7,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":32,"forks":5,"open_issues":32,"watchers":7,"default_branch":"develop"}},"base":{"label":"wordpress-mobile:develop","ref":"develop","sha":"efb45d84470011cb8fdbc3564ce410d388b3bb50","user":{"login":"wordpress-mobile","id":1306301,"avatar_url":"https://avatars.githubusercontent.com/u/1306301?v=3","gravatar_id":"","url":"https://api.github.com/users/wordpress-mobile","html_url":"https://github.com/wordpress-mobile","followers_url":"https://api.github.com/users/wordpress-mobile/followers","following_url":"https://api.github.com/users/wordpress-mobile/following{/other_user}","gists_url":"https://api.github.com/users/wordpress-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/wordpress-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wordpress-mobile/subscriptions","organizations_url":"https://api.github.com/users/wordpress-mobile/orgs","repos_url":"https://api.github.com/users/wordpress-mobile/repos","events_url":"https://api.github.com/users/wordpress-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/wordpress-mobile/received_events","type":"Organization","site_admin":false},"repo":{"id":19698391,"name":"WordPressCom-Stats-iOS","full_name":"wordpress-mobile/WordPressCom-Stats-iOS","owner":{"login":"wordpress-mobile","id":1306301,"avatar_url":"https://avatars.githubusercontent.com/u/1306301?v=3","gravatar_id":"","url":"https://api.github.com/users/wordpress-mobile","html_url":"https://github.com/wordpress-mobile","followers_url":"https://api.github.com/users/wordpress-mobile/followers","following_url":"https://api.github.com/users/wordpress-mobile/following{/other_user}","gists_url":"https://api.github.com/users/wordpress-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/wordpress-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wordpress-mobile/subscriptions","organizations_url":"https://api.github.com/users/wordpress-mobile/orgs","repos_url":"https://api.github.com/users/wordpress-mobile/repos","events_url":"https://api.github.com/users/wordpress-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/wordpress-mobile/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wordpress-mobile/WordPressCom-Stats-iOS","description":"Reusable component for displaying WordPress.com site stats in an iOS application","fork":false,"url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS","forks_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/forks","keys_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/teams","hooks_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/hooks","issue_events_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/issues/events{/number}","events_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/events","assignees_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/assignees{/user}","branches_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/branches{/branch}","tags_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/tags","blobs_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/git/refs{/sha}","trees_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/statuses/{sha}","languages_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/languages","stargazers_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/stargazers","contributors_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/contributors","subscribers_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/subscribers","subscription_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/subscription","commits_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/commits{/sha}","git_commits_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/git/commits{/sha}","comments_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/comments{/number}","issue_comment_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/issues/comments{/number}","contents_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/contents/{+path}","compare_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/merges","archive_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/downloads","issues_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/issues{/number}","pulls_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/pulls{/number}","milestones_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/milestones{/number}","notifications_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/labels{/name}","releases_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/releases{/id}","created_at":"2014-05-12T12:48:07Z","updated_at":"2015-05-06T23:00:07Z","pushed_at":"2015-07-22T23:30:16Z","git_url":"git://github.com/wordpress-mobile/WordPressCom-Stats-iOS.git","ssh_url":"git@github.com:wordpress-mobile/WordPressCom-Stats-iOS.git","clone_url":"https://github.com/wordpress-mobile/WordPressCom-Stats-iOS.git","svn_url":"https://github.com/wordpress-mobile/WordPressCom-Stats-iOS","homepage":null,"size":3456,"stargazers_count":7,"watchers_count":7,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":32,"forks":5,"open_issues":32,"watchers":7,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/pulls/286"},"html":{"href":"https://github.com/wordpress-mobile/WordPressCom-Stats-iOS/pull/286"},"issue":{"href":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/issues/286"},"comments":{"href":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/issues/286/comments"},"review_comments":{"href":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/pulls/286/comments"},"review_comment":{"href":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/pulls/286/commits"},"statuses":{"href":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/statuses/b3025e7a3386828d2ccdd9dd53938b368e2bdd13"}}}}