{"action":"opened","number":67,"pull_request":{"url":"https://api.github.com/repos/facebook/Tweaks/pulls/67","id":27980383,"html_url":"https://github.com/facebook/Tweaks/pull/67","diff_url":"https://github.com/facebook/Tweaks/pull/67.diff","patch_url":"https://github.com/facebook/Tweaks/pull/67.patch","issue_url":"https://api.github.com/repos/facebook/Tweaks/issues/67","number":67,"state":"open","locked":false,"title":"Dictionary and array support","user":{"login":"johntmcintosh","id":931283,"avatar_url":"https://avatars.githubusercontent.com/u/931283?v=3","gravatar_id":"","url":"https://api.github.com/users/johntmcintosh","html_url":"https://github.com/johntmcintosh","followers_url":"https://api.github.com/users/johntmcintosh/followers","following_url":"https://api.github.com/users/johntmcintosh/following{/other_user}","gists_url":"https://api.github.com/users/johntmcintosh/gists{/gist_id}","starred_url":"https://api.github.com/users/johntmcintosh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johntmcintosh/subscriptions","organizations_url":"https://api.github.com/users/johntmcintosh/orgs","repos_url":"https://api.github.com/users/johntmcintosh/repos","events_url":"https://api.github.com/users/johntmcintosh/events{/privacy}","received_events_url":"https://api.github.com/users/johntmcintosh/received_events","type":"User","site_admin":false},"body":"This PR adds support for dictionaries and arrays to Tweaks. The idea for how to go about the implementation came from PR #46 and is similar to #64 which I just came across while posting. We've been using this successfully in a production app so hopefully there shouldn't any bugs, but let me know if you see anything and I'll be happy to address it. Also, this will hopefully take case of issue #22.\r\n\r\nThe implementation adds the ability to tap on a dictionary or array tweak in the Tweaks UI, and present a drill-down list of values to choose from. \r\n\r\nFor array tweaks, the values are displayed by calling `description` of each item in the array. Therefore the items don't have to be string values and can be chosen based on their `description`.\r\n\r\nFor dictionary tweaks, the dictionary's keys are displayed in the Tweaks UI and the values are never shown. It is expected that the keys will be strings.\r\n\r\nHere's a screenshot of the addition to the sample app showing these two in use. \"Rotation (radians)\" is an example of an array tweak, and \"Color\" is an example of a dictionary tweak.\r\n![screen shot 2015-01-24 at 12 40 08 pm](https://cloud.githubusercontent.com/assets/931283/5888495/2c533b40-a3c6-11e4-886e-96ceea2b4fcd.png)\r\n\r\nEach item in the array (shown below) does not have to be a string value. In this example, the array items are instances of `NSNumber` and the value presented in the UI is the output of `-[NSNumber description]`\r\n![screen shot 2015-01-24 at 12 40 43 pm](https://cloud.githubusercontent.com/assets/931283/5888496/3bf2f978-a3c6-11e4-8ec3-add3d59a975b.png)\r\n\r\nEach item in the dictionary (shown below) has a string key that is displayed in the UI. In this example, there are `UIColor` instances associated with each of the string keys. \r\n![screen shot 2015-01-24 at 12 41 53 pm](https://cloud.githubusercontent.com/assets/931283/5888507/63679680-a3c6-11e4-8117-03c73edac66e.png)","created_at":"2015-01-24T18:49:26Z","updated_at":"2015-01-24T18:49:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/facebook/Tweaks/pulls/67/commits","review_comments_url":"https://api.github.com/repos/facebook/Tweaks/pulls/67/comments","review_comment_url":"https://api.github.com/repos/facebook/Tweaks/pulls/comments/{number}","comments_url":"https://api.github.com/repos/facebook/Tweaks/issues/67/comments","statuses_url":"https://api.github.com/repos/facebook/Tweaks/statuses/19bf41a7c54349d5e68028388678f4fda5e4c008","head":{"label":"johntmcintosh:DictionaryAndArraySupport","ref":"DictionaryAndArraySupport","sha":"19bf41a7c54349d5e68028388678f4fda5e4c008","user":{"login":"johntmcintosh","id":931283,"avatar_url":"https://avatars.githubusercontent.com/u/931283?v=3","gravatar_id":"","url":"https://api.github.com/users/johntmcintosh","html_url":"https://github.com/johntmcintosh","followers_url":"https://api.github.com/users/johntmcintosh/followers","following_url":"https://api.github.com/users/johntmcintosh/following{/other_user}","gists_url":"https://api.github.com/users/johntmcintosh/gists{/gist_id}","starred_url":"https://api.github.com/users/johntmcintosh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johntmcintosh/subscriptions","organizations_url":"https://api.github.com/users/johntmcintosh/orgs","repos_url":"https://api.github.com/users/johntmcintosh/repos","events_url":"https://api.github.com/users/johntmcintosh/events{/privacy}","received_events_url":"https://api.github.com/users/johntmcintosh/received_events","type":"User","site_admin":false},"repo":{"id":26233984,"name":"Tweaks","full_name":"johntmcintosh/Tweaks","owner":{"login":"johntmcintosh","id":931283,"avatar_url":"https://avatars.githubusercontent.com/u/931283?v=3","gravatar_id":"","url":"https://api.github.com/users/johntmcintosh","html_url":"https://github.com/johntmcintosh","followers_url":"https://api.github.com/users/johntmcintosh/followers","following_url":"https://api.github.com/users/johntmcintosh/following{/other_user}","gists_url":"https://api.github.com/users/johntmcintosh/gists{/gist_id}","starred_url":"https://api.github.com/users/johntmcintosh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johntmcintosh/subscriptions","organizations_url":"https://api.github.com/users/johntmcintosh/orgs","repos_url":"https://api.github.com/users/johntmcintosh/repos","events_url":"https://api.github.com/users/johntmcintosh/events{/privacy}","received_events_url":"https://api.github.com/users/johntmcintosh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/johntmcintosh/Tweaks","description":"Easily adjust parameters for iOS apps in development.","fork":true,"url":"https://api.github.com/repos/johntmcintosh/Tweaks","forks_url":"https://api.github.com/repos/johntmcintosh/Tweaks/forks","keys_url":"https://api.github.com/repos/johntmcintosh/Tweaks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/johntmcintosh/Tweaks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/johntmcintosh/Tweaks/teams","hooks_url":"https://api.github.com/repos/johntmcintosh/Tweaks/hooks","issue_events_url":"https://api.github.com/repos/johntmcintosh/Tweaks/issues/events{/number}","events_url":"https://api.github.com/repos/johntmcintosh/Tweaks/events","assignees_url":"https://api.github.com/repos/johntmcintosh/Tweaks/assignees{/user}","branches_url":"https://api.github.com/repos/johntmcintosh/Tweaks/branches{/branch}","tags_url":"https://api.github.com/repos/johntmcintosh/Tweaks/tags","blobs_url":"https://api.github.com/repos/johntmcintosh/Tweaks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/johntmcintosh/Tweaks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/johntmcintosh/Tweaks/git/refs{/sha}","trees_url":"https://api.github.com/repos/johntmcintosh/Tweaks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/johntmcintosh/Tweaks/statuses/{sha}","languages_url":"https://api.github.com/repos/johntmcintosh/Tweaks/languages","stargazers_url":"https://api.github.com/repos/johntmcintosh/Tweaks/stargazers","contributors_url":"https://api.github.com/repos/johntmcintosh/Tweaks/contributors","subscribers_url":"https://api.github.com/repos/johntmcintosh/Tweaks/subscribers","subscription_url":"https://api.github.com/repos/johntmcintosh/Tweaks/subscription","commits_url":"https://api.github.com/repos/johntmcintosh/Tweaks/commits{/sha}","git_commits_url":"https://api.github.com/repos/johntmcintosh/Tweaks/git/commits{/sha}","comments_url":"https://api.github.com/repos/johntmcintosh/Tweaks/comments{/number}","issue_comment_url":"https://api.github.com/repos/johntmcintosh/Tweaks/issues/comments/{number}","contents_url":"https://api.github.com/repos/johntmcintosh/Tweaks/contents/{+path}","compare_url":"https://api.github.com/repos/johntmcintosh/Tweaks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/johntmcintosh/Tweaks/merges","archive_url":"https://api.github.com/repos/johntmcintosh/Tweaks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/johntmcintosh/Tweaks/downloads","issues_url":"https://api.github.com/repos/johntmcintosh/Tweaks/issues{/number}","pulls_url":"https://api.github.com/repos/johntmcintosh/Tweaks/pulls{/number}","milestones_url":"https://api.github.com/repos/johntmcintosh/Tweaks/milestones{/number}","notifications_url":"https://api.github.com/repos/johntmcintosh/Tweaks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/johntmcintosh/Tweaks/labels{/name}","releases_url":"https://api.github.com/repos/johntmcintosh/Tweaks/releases{/id}","created_at":"2014-11-05T18:45:08Z","updated_at":"2014-11-05T16:29:33Z","pushed_at":"2015-01-24T18:28:44Z","git_url":"git://github.com/johntmcintosh/Tweaks.git","ssh_url":"git@github.com:johntmcintosh/Tweaks.git","clone_url":"https://github.com/johntmcintosh/Tweaks.git","svn_url":"https://github.com/johntmcintosh/Tweaks","homepage":null,"size":441,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"e513c1435bae701df9f2833acf2bc901a21b1b32","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":17733708,"name":"Tweaks","full_name":"facebook/Tweaks","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/Tweaks","description":"An easy way to fine-tune, and adjust parameters for iOS apps in development.","fork":false,"url":"https://api.github.com/repos/facebook/Tweaks","forks_url":"https://api.github.com/repos/facebook/Tweaks/forks","keys_url":"https://api.github.com/repos/facebook/Tweaks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/Tweaks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/Tweaks/teams","hooks_url":"https://api.github.com/repos/facebook/Tweaks/hooks","issue_events_url":"https://api.github.com/repos/facebook/Tweaks/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/Tweaks/events","assignees_url":"https://api.github.com/repos/facebook/Tweaks/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/Tweaks/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/Tweaks/tags","blobs_url":"https://api.github.com/repos/facebook/Tweaks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/Tweaks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/Tweaks/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/Tweaks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/Tweaks/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/Tweaks/languages","stargazers_url":"https://api.github.com/repos/facebook/Tweaks/stargazers","contributors_url":"https://api.github.com/repos/facebook/Tweaks/contributors","subscribers_url":"https://api.github.com/repos/facebook/Tweaks/subscribers","subscription_url":"https://api.github.com/repos/facebook/Tweaks/subscription","commits_url":"https://api.github.com/repos/facebook/Tweaks/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/Tweaks/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/Tweaks/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/Tweaks/issues/comments/{number}","contents_url":"https://api.github.com/repos/facebook/Tweaks/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/Tweaks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/Tweaks/merges","archive_url":"https://api.github.com/repos/facebook/Tweaks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/Tweaks/downloads","issues_url":"https://api.github.com/repos/facebook/Tweaks/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/Tweaks/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/Tweaks/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/Tweaks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/Tweaks/labels{/name}","releases_url":"https://api.github.com/repos/facebook/Tweaks/releases{/id}","created_at":"2014-03-14T02:58:52Z","updated_at":"2015-01-24T13:59:35Z","pushed_at":"2015-01-23T18:12:27Z","git_url":"git://github.com/facebook/Tweaks.git","ssh_url":"git@github.com:facebook/Tweaks.git","clone_url":"https://github.com/facebook/Tweaks.git","svn_url":"https://github.com/facebook/Tweaks","homepage":"","size":1046,"stargazers_count":3283,"watchers_count":3283,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":255,"mirror_url":null,"open_issues_count":21,"forks":255,"open_issues":21,"watchers":3283,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/Tweaks/pulls/67"},"html":{"href":"https://github.com/facebook/Tweaks/pull/67"},"issue":{"href":"https://api.github.com/repos/facebook/Tweaks/issues/67"},"comments":{"href":"https://api.github.com/repos/facebook/Tweaks/issues/67/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/Tweaks/pulls/67/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/Tweaks/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/facebook/Tweaks/pulls/67/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/Tweaks/statuses/19bf41a7c54349d5e68028388678f4fda5e4c008"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":12,"additions":665,"deletions":40,"changed_files":15}}