{"action":"created","comment":{"url":"https://api.github.com/repos/xitu/gold-miner/pulls/comments/92945566","pull_request_review_id":13468009,"id":92945566,"diff_hunk":"@@ -1,81 +1,82 @@\n > * 原文地址：[iOS: Custom Modality](https://medium.com/@_kolodziejczyk/ios-custom-modality-a193c293d4d6#.b2d4uj1bt)\n * 原文作者：[Kamil Kołodziejczyk](https://twitter.com/_kolodziejczyk)\n * 译文出自：[掘金翻译计划](https://github.com/xitu/gold-miner)\n-* 译者：\n+* 译者：[zhouzihanntu](https://github.com/zhouzihanntu)\n * 校对者：\n \n ---\n \n-# iOS: Custom Modality\n+# iOS: 自定义 Modal 视图\n \n-## Modals became so diverse that Apple’s HIG no longer cuts it. How to choose from all the custom options out there?\n+## Modal 视图越来越多样化，连 Apple 官方人机交互指南都没法三言两语解释清楚。我们又该如何从海量的选择中作出决定呢？\n \n ![](https://cdn-images-1.medium.com/max/2000/1*LPXhF6DNBVu8qz4P-sHZTA.png)\n \n-I’m thrilled when developers ask me about my choice of view types. I get to go on and on about the problem and my take on it. Interestingly, they are often surprised when they realise it had nothing to do with aesthetics.\n+当开发者们询问我如何选择视图类型时，我是震惊的。我不得不反复地思考这个问题以及我会选择的解决方案。有趣的是，当发现对视图的选择往往与美学无关时，他们常常会感到惊讶。\n \n-[Modality](https://developer.apple.com/ios/human-interface-guidelines/interaction/modality/) in *iOS Human Interface Guidelines* is a great resource on that topic. That’s where I refer everyone to. But recently a friend told me, that it wasn’t enough for him.\n+我推荐大家去看 *iOS 人机交互设计指南* 里关于 [Modal 视图](https://developer.apple.com/ios/human-interface-guidelines/interaction/modality/) 的介绍，这是关于 modal 话题的很棒的参考资料。但最近有个朋友和我说，这篇文章的内容还不能满足他的要求。\n \n-Curious, I started checking out existing patterns to figure out how much more there is to it. He was right.\n+出于好奇，我查询了各种现有的样式，来看看究竟有多少不同的种类。他是对的，这篇文章的内容确实不够完整。\n \n-Which modal is the best choice then? I put together a list that’ll help you decide. Let’s go through it.\n+那么哪种 modal 才是最好的选择呢？我列了一个清单，也许对你做决定有帮助。下面就来看看吧。\n \n-### Modal Types\n+### 类型\n \n-Modals are a way to step out of the main flow of the app to make a decision or complete a task. They are the best tool when we need user’s uninterrupted attention.\n+Modal 是一种使用户从当前工作流中转换到另一个界面，去做一些选择或完成某些任务的视图。当我们需要用户保持注意时它们是最好的工具。\n \n-> While *navigation controllers* promote content and its hierarchy, modals always exist in the context of a task.\n+> 与导航控制器这种注重内容和视图层级的视图不同，modal 总是为了某项特定任务而存在。\n \n-There is a lot of modal types out there. They can take up the whole screen, or a part of it. They can be centered, fixed to the top or bottom. Sometimes they pop-up, sometimes slide from a side. *No wonder this is confusing.*\n+现在有很多类型的 modal ，它们可能覆盖整个屏幕或屏幕的一部分，也可能显示在屏幕中央或固定在屏幕顶部或底部。有时它们以弹出框的方式出现，有时又从一侧滑出。 *这的确令人困惑*\n \n-There’s a lot to break down here before you make a decision. My rule of thumb is to check if the view lets people **pick** a task or **do** a task.\n+在做决定之前你需要考虑一些事。我的经验是先确定视图是让人们 **选择** 一项任务还是 **完成** 一项任务。","path":"TODO/ios-custom-modality.md","position":42,"original_position":43,"commit_id":"0e0fabd3b32107daa1bac9181d0290b2b09b793a","original_commit_id":"0e0fabd3b32107daa1bac9181d0290b2b09b793a","user":{"login":"marcmoore","id":502900,"avatar_url":"https://avatars.githubusercontent.com/u/502900?v=3","gravatar_id":"","url":"https://api.github.com/users/marcmoore","html_url":"https://github.com/marcmoore","followers_url":"https://api.github.com/users/marcmoore/followers","following_url":"https://api.github.com/users/marcmoore/following{/other_user}","gists_url":"https://api.github.com/users/marcmoore/gists{/gist_id}","starred_url":"https://api.github.com/users/marcmoore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcmoore/subscriptions","organizations_url":"https://api.github.com/users/marcmoore/orgs","repos_url":"https://api.github.com/users/marcmoore/repos","events_url":"https://api.github.com/users/marcmoore/events{/privacy}","received_events_url":"https://api.github.com/users/marcmoore/received_events","type":"User","site_admin":false},"body":"选择 和 完成 前后不需要空格。","created_at":"2016-12-18T17:05:06Z","updated_at":"2016-12-18T17:05:06Z","html_url":"https://github.com/xitu/gold-miner/pull/1057#discussion_r92945566","pull_request_url":"https://api.github.com/repos/xitu/gold-miner/pulls/1057","_links":{"self":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/comments/92945566"},"html":{"href":"https://github.com/xitu/gold-miner/pull/1057#discussion_r92945566"},"pull_request":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/1057"}}},"pull_request":{"url":"https://api.github.com/repos/xitu/gold-miner/pulls/1057","id":98294878,"html_url":"https://github.com/xitu/gold-miner/pull/1057","diff_url":"https://github.com/xitu/gold-miner/pull/1057.diff","patch_url":"https://github.com/xitu/gold-miner/pull/1057.patch","issue_url":"https://api.github.com/repos/xitu/gold-miner/issues/1057","number":1057,"state":"open","locked":false,"title":"iOS: 自定义 Modal","user":{"login":"zhouzihanntu","id":14007659,"avatar_url":"https://avatars.githubusercontent.com/u/14007659?v=3","gravatar_id":"","url":"https://api.github.com/users/zhouzihanntu","html_url":"https://github.com/zhouzihanntu","followers_url":"https://api.github.com/users/zhouzihanntu/followers","following_url":"https://api.github.com/users/zhouzihanntu/following{/other_user}","gists_url":"https://api.github.com/users/zhouzihanntu/gists{/gist_id}","starred_url":"https://api.github.com/users/zhouzihanntu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhouzihanntu/subscriptions","organizations_url":"https://api.github.com/users/zhouzihanntu/orgs","repos_url":"https://api.github.com/users/zhouzihanntu/repos","events_url":"https://api.github.com/users/zhouzihanntu/events{/privacy}","received_events_url":"https://api.github.com/users/zhouzihanntu/received_events","type":"User","site_admin":false},"body":"@sqrthree 翻译完成~请大佬们校对","created_at":"2016-12-16T08:25:19Z","updated_at":"2016-12-18T17:05:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6dcc1cdbeb7f6aeae8b2c83ee06f0911de238e86","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/xitu/gold-miner/pulls/1057/commits","review_comments_url":"https://api.github.com/repos/xitu/gold-miner/pulls/1057/comments","review_comment_url":"https://api.github.com/repos/xitu/gold-miner/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xitu/gold-miner/issues/1057/comments","statuses_url":"https://api.github.com/repos/xitu/gold-miner/statuses/0e0fabd3b32107daa1bac9181d0290b2b09b793a","head":{"label":"zhouzihanntu:master","ref":"master","sha":"0e0fabd3b32107daa1bac9181d0290b2b09b793a","user":{"login":"zhouzihanntu","id":14007659,"avatar_url":"https://avatars.githubusercontent.com/u/14007659?v=3","gravatar_id":"","url":"https://api.github.com/users/zhouzihanntu","html_url":"https://github.com/zhouzihanntu","followers_url":"https://api.github.com/users/zhouzihanntu/followers","following_url":"https://api.github.com/users/zhouzihanntu/following{/other_user}","gists_url":"https://api.github.com/users/zhouzihanntu/gists{/gist_id}","starred_url":"https://api.github.com/users/zhouzihanntu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhouzihanntu/subscriptions","organizations_url":"https://api.github.com/users/zhouzihanntu/orgs","repos_url":"https://api.github.com/users/zhouzihanntu/repos","events_url":"https://api.github.com/users/zhouzihanntu/events{/privacy}","received_events_url":"https://api.github.com/users/zhouzihanntu/received_events","type":"User","site_admin":false},"repo":{"id":76437196,"name":"gold-miner","full_name":"zhouzihanntu/gold-miner","owner":{"login":"zhouzihanntu","id":14007659,"avatar_url":"https://avatars.githubusercontent.com/u/14007659?v=3","gravatar_id":"","url":"https://api.github.com/users/zhouzihanntu","html_url":"https://github.com/zhouzihanntu","followers_url":"https://api.github.com/users/zhouzihanntu/followers","following_url":"https://api.github.com/users/zhouzihanntu/following{/other_user}","gists_url":"https://api.github.com/users/zhouzihanntu/gists{/gist_id}","starred_url":"https://api.github.com/users/zhouzihanntu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhouzihanntu/subscriptions","organizations_url":"https://api.github.com/users/zhouzihanntu/orgs","repos_url":"https://api.github.com/users/zhouzihanntu/repos","events_url":"https://api.github.com/users/zhouzihanntu/events{/privacy}","received_events_url":"https://api.github.com/users/zhouzihanntu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zhouzihanntu/gold-miner","description":"掘金翻译计划，翻译掘金上优质的英文文章","fork":true,"url":"https://api.github.com/repos/zhouzihanntu/gold-miner","forks_url":"https://api.github.com/repos/zhouzihanntu/gold-miner/forks","keys_url":"https://api.github.com/repos/zhouzihanntu/gold-miner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zhouzihanntu/gold-miner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zhouzihanntu/gold-miner/teams","hooks_url":"https://api.github.com/repos/zhouzihanntu/gold-miner/hooks","issue_events_url":"https://api.github.com/repos/zhouzihanntu/gold-miner/issues/events{/number}","events_url":"https://api.github.com/repos/zhouzihanntu/gold-miner/events","assignees_url":"https://api.github.com/repos/zhouzihanntu/gold-miner/assignees{/user}","branches_url":"https://api.github.com/repos/zhouzihanntu/gold-miner/branches{/branch}","tags_url":"https://api.github.com/repos/zhouzihanntu/gold-miner/tags","blobs_url":"https://api.github.com/repos/zhouzihanntu/gold-miner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zhouzihanntu/gold-miner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zhouzihanntu/gold-miner/git/refs{/sha}","trees_url":"https://api.github.com/repos/zhouzihanntu/gold-miner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zhouzihanntu/gold-miner/statuses/{sha}","languages_url":"https://api.github.com/repos/zhouzihanntu/gold-miner/languages","stargazers_url":"https://api.github.com/repos/zhouzihanntu/gold-miner/stargazers","contributors_url":"https://api.github.com/repos/zhouzihanntu/gold-miner/contributors","subscribers_url":"https://api.github.com/repos/zhouzihanntu/gold-miner/subscribers","subscription_url":"https://api.github.com/repos/zhouzihanntu/gold-miner/subscription","commits_url":"https://api.github.com/repos/zhouzihanntu/gold-miner/commits{/sha}","git_commits_url":"https://api.github.com/repos/zhouzihanntu/gold-miner/git/commits{/sha}","comments_url":"https://api.github.com/repos/zhouzihanntu/gold-miner/comments{/number}","issue_comment_url":"https://api.github.com/repos/zhouzihanntu/gold-miner/issues/comments{/number}","contents_url":"https://api.github.com/repos/zhouzihanntu/gold-miner/contents/{+path}","compare_url":"https://api.github.com/repos/zhouzihanntu/gold-miner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zhouzihanntu/gold-miner/merges","archive_url":"https://api.github.com/repos/zhouzihanntu/gold-miner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zhouzihanntu/gold-miner/downloads","issues_url":"https://api.github.com/repos/zhouzihanntu/gold-miner/issues{/number}","pulls_url":"https://api.github.com/repos/zhouzihanntu/gold-miner/pulls{/number}","milestones_url":"https://api.github.com/repos/zhouzihanntu/gold-miner/milestones{/number}","notifications_url":"https://api.github.com/repos/zhouzihanntu/gold-miner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zhouzihanntu/gold-miner/labels{/name}","releases_url":"https://api.github.com/repos/zhouzihanntu/gold-miner/releases{/id}","deployments_url":"https://api.github.com/repos/zhouzihanntu/gold-miner/deployments","created_at":"2016-12-14T07:52:34Z","updated_at":"2016-12-14T07:26:08Z","pushed_at":"2016-12-17T07:32:49Z","git_url":"git://github.com/zhouzihanntu/gold-miner.git","ssh_url":"git@github.com:zhouzihanntu/gold-miner.git","clone_url":"https://github.com/zhouzihanntu/gold-miner.git","svn_url":"https://github.com/zhouzihanntu/gold-miner","homepage":"http://juejin.im","size":17505,"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":"xitu:master","ref":"master","sha":"9fcf0f22dd8fa37756b344b057007d59705b9ea2","user":{"login":"xitu","id":10482599,"avatar_url":"https://avatars.githubusercontent.com/u/10482599?v=3","gravatar_id":"","url":"https://api.github.com/users/xitu","html_url":"https://github.com/xitu","followers_url":"https://api.github.com/users/xitu/followers","following_url":"https://api.github.com/users/xitu/following{/other_user}","gists_url":"https://api.github.com/users/xitu/gists{/gist_id}","starred_url":"https://api.github.com/users/xitu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xitu/subscriptions","organizations_url":"https://api.github.com/users/xitu/orgs","repos_url":"https://api.github.com/users/xitu/repos","events_url":"https://api.github.com/users/xitu/events{/privacy}","received_events_url":"https://api.github.com/users/xitu/received_events","type":"Organization","site_admin":false},"repo":{"id":45512989,"name":"gold-miner","full_name":"xitu/gold-miner","owner":{"login":"xitu","id":10482599,"avatar_url":"https://avatars.githubusercontent.com/u/10482599?v=3","gravatar_id":"","url":"https://api.github.com/users/xitu","html_url":"https://github.com/xitu","followers_url":"https://api.github.com/users/xitu/followers","following_url":"https://api.github.com/users/xitu/following{/other_user}","gists_url":"https://api.github.com/users/xitu/gists{/gist_id}","starred_url":"https://api.github.com/users/xitu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xitu/subscriptions","organizations_url":"https://api.github.com/users/xitu/orgs","repos_url":"https://api.github.com/users/xitu/repos","events_url":"https://api.github.com/users/xitu/events{/privacy}","received_events_url":"https://api.github.com/users/xitu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xitu/gold-miner","description":"掘金翻译计划，翻译掘金上优质的英文文章","fork":false,"url":"https://api.github.com/repos/xitu/gold-miner","forks_url":"https://api.github.com/repos/xitu/gold-miner/forks","keys_url":"https://api.github.com/repos/xitu/gold-miner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xitu/gold-miner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xitu/gold-miner/teams","hooks_url":"https://api.github.com/repos/xitu/gold-miner/hooks","issue_events_url":"https://api.github.com/repos/xitu/gold-miner/issues/events{/number}","events_url":"https://api.github.com/repos/xitu/gold-miner/events","assignees_url":"https://api.github.com/repos/xitu/gold-miner/assignees{/user}","branches_url":"https://api.github.com/repos/xitu/gold-miner/branches{/branch}","tags_url":"https://api.github.com/repos/xitu/gold-miner/tags","blobs_url":"https://api.github.com/repos/xitu/gold-miner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xitu/gold-miner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xitu/gold-miner/git/refs{/sha}","trees_url":"https://api.github.com/repos/xitu/gold-miner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xitu/gold-miner/statuses/{sha}","languages_url":"https://api.github.com/repos/xitu/gold-miner/languages","stargazers_url":"https://api.github.com/repos/xitu/gold-miner/stargazers","contributors_url":"https://api.github.com/repos/xitu/gold-miner/contributors","subscribers_url":"https://api.github.com/repos/xitu/gold-miner/subscribers","subscription_url":"https://api.github.com/repos/xitu/gold-miner/subscription","commits_url":"https://api.github.com/repos/xitu/gold-miner/commits{/sha}","git_commits_url":"https://api.github.com/repos/xitu/gold-miner/git/commits{/sha}","comments_url":"https://api.github.com/repos/xitu/gold-miner/comments{/number}","issue_comment_url":"https://api.github.com/repos/xitu/gold-miner/issues/comments{/number}","contents_url":"https://api.github.com/repos/xitu/gold-miner/contents/{+path}","compare_url":"https://api.github.com/repos/xitu/gold-miner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xitu/gold-miner/merges","archive_url":"https://api.github.com/repos/xitu/gold-miner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xitu/gold-miner/downloads","issues_url":"https://api.github.com/repos/xitu/gold-miner/issues{/number}","pulls_url":"https://api.github.com/repos/xitu/gold-miner/pulls{/number}","milestones_url":"https://api.github.com/repos/xitu/gold-miner/milestones{/number}","notifications_url":"https://api.github.com/repos/xitu/gold-miner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xitu/gold-miner/labels{/name}","releases_url":"https://api.github.com/repos/xitu/gold-miner/releases{/id}","deployments_url":"https://api.github.com/repos/xitu/gold-miner/deployments","created_at":"2015-11-04T03:29:13Z","updated_at":"2016-12-18T11:33:31Z","pushed_at":"2016-12-18T13:51:41Z","git_url":"git://github.com/xitu/gold-miner.git","ssh_url":"git@github.com:xitu/gold-miner.git","clone_url":"https://github.com/xitu/gold-miner.git","svn_url":"https://github.com/xitu/gold-miner","homepage":"http://juejin.im","size":17721,"stargazers_count":5561,"watchers_count":5561,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1047,"mirror_url":null,"open_issues_count":19,"forks":1047,"open_issues":19,"watchers":5561,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/1057"},"html":{"href":"https://github.com/xitu/gold-miner/pull/1057"},"issue":{"href":"https://api.github.com/repos/xitu/gold-miner/issues/1057"},"comments":{"href":"https://api.github.com/repos/xitu/gold-miner/issues/1057/comments"},"review_comments":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/1057/comments"},"review_comment":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/1057/commits"},"statuses":{"href":"https://api.github.com/repos/xitu/gold-miner/statuses/0e0fabd3b32107daa1bac9181d0290b2b09b793a"}}}}
{"actor":{"display_login":"marcmoore"}}