{"action":"created","comment":{"url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/pulls/comments/101925966","pull_request_review_id":22666743,"id":101925966,"diff_hunk":"@@ -0,0 +1,51 @@\n+//\n+//  Authorization.swift\n+//  SwiftLesson2\n+//\n+//  Created by Rustam N on 15.02.17.\n+//  Copyright © 2017 com.personal.ildar. All rights reserved.\n+//\n+\n+import UIKit\n+\n+class Authorization: UIViewController, UIScrollViewDelegate {\n+    @IBOutlet weak var emailTextField: UITextField!\n+    @IBOutlet weak var passwordTextField: UITextField!\n+    @IBOutlet weak var logInButton: UIButton!\n+    @IBOutlet weak var scroll: UIScrollView!\n+    @IBOutlet weak var secondView: UIView!\n+    let userDefaults = Foundation.UserDefaults.standard\n+   \n+\n+    override func viewDidLoad() {\n+        if userDefaults.bool(forKey: \"isAutohorization\") {\n+            let storyboard = UIStoryboard(name: \"Main\", bundle: nil)\n+            let listsVC = storyboard.instantiateViewController(withIdentifier: \"Lists\") as! Lists\n+            self.present(listsVC, animated: true, completion: nil)\n+        }\n+        else {\n+            self.scroll.contentInset = UIEdgeInsetsMake(0, 0, 5, 0);\n+            self.navigationController?.isNavigationBarHidden = true\n+        }\n+    }\n+    \n+    override func viewDidDisappear(_ animated: Bool) {\n+        passwordTextField.text = \"\"\n+    }\n+    \n+    \n+    @IBAction func logInButtonAction(_ sender: UIButton) {\n+        if !Helper.regularCheck(for: \"[a-zA-Z0-9]+@(([a-zA-Z0-9\\\\-]+\\\\.)([a-zA-Z0-9\\\\-])+)+\", in: emailTextField.text!){\n+            let alert = Helper.allert(alertTitle: \"Incorect email\", message: \"Correct email\", actionTitle: \"Ok\")\n+            self.present(alert, animated: true, completion: nil)\n+        }\n+        if !Helper.regularCheck(for: \"[[A-ZА-Я]+[0-9]+[a-zа-я]+]{6,}\", in: passwordTextField.text!){\n+            let alert = Helper.allert(alertTitle: \"Incorect password\", message: \"Correct password\", actionTitle: \"Ok\")\n+            self.present(alert, animated: true, completion: nil)\n+        }\n+        else{\n+            userDefaults.set(true, forKey: \"isAutohorization\")","path":"SwiftLesson2/Authorization.swift","position":47,"original_position":47,"commit_id":"4289102a51a675b14626cb89fe756589800483c2","original_commit_id":"4289102a51a675b14626cb89fe756589800483c2","user":{"login":"Rustamnurg","id":14811116,"avatar_url":"https://avatars.githubusercontent.com/u/14811116?v=3","gravatar_id":"","url":"https://api.github.com/users/Rustamnurg","html_url":"https://github.com/Rustamnurg","followers_url":"https://api.github.com/users/Rustamnurg/followers","following_url":"https://api.github.com/users/Rustamnurg/following{/other_user}","gists_url":"https://api.github.com/users/Rustamnurg/gists{/gist_id}","starred_url":"https://api.github.com/users/Rustamnurg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rustamnurg/subscriptions","organizations_url":"https://api.github.com/users/Rustamnurg/orgs","repos_url":"https://api.github.com/users/Rustamnurg/repos","events_url":"https://api.github.com/users/Rustamnurg/events{/privacy}","received_events_url":"https://api.github.com/users/Rustamnurg/received_events","type":"User","site_admin":false},"body":"я сейчас почтил и вот \"So yeah, long story short, do not use synchronize in iOS 8 and later.\"","created_at":"2017-02-19T19:09:41Z","updated_at":"2017-02-19T19:09:41Z","html_url":"https://github.com/ZalyalovIldar/Swift-lesson-2/pull/2#discussion_r101925966","pull_request_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/pulls/comments/101925966"},"html":{"href":"https://github.com/ZalyalovIldar/Swift-lesson-2/pull/2#discussion_r101925966"},"pull_request":{"href":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/pulls/2","id":106769332,"html_url":"https://github.com/ZalyalovIldar/Swift-lesson-2/pull/2","diff_url":"https://github.com/ZalyalovIldar/Swift-lesson-2/pull/2.diff","patch_url":"https://github.com/ZalyalovIldar/Swift-lesson-2/pull/2.patch","issue_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/issues/2","number":2,"state":"open","locked":false,"title":"hw","user":{"login":"Rustamnurg","id":14811116,"avatar_url":"https://avatars.githubusercontent.com/u/14811116?v=3","gravatar_id":"","url":"https://api.github.com/users/Rustamnurg","html_url":"https://github.com/Rustamnurg","followers_url":"https://api.github.com/users/Rustamnurg/followers","following_url":"https://api.github.com/users/Rustamnurg/following{/other_user}","gists_url":"https://api.github.com/users/Rustamnurg/gists{/gist_id}","starred_url":"https://api.github.com/users/Rustamnurg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rustamnurg/subscriptions","organizations_url":"https://api.github.com/users/Rustamnurg/orgs","repos_url":"https://api.github.com/users/Rustamnurg/repos","events_url":"https://api.github.com/users/Rustamnurg/events{/privacy}","received_events_url":"https://api.github.com/users/Rustamnurg/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-02-17T16:45:55Z","updated_at":"2017-02-19T19:09:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3f371e912cc269f72b4aaf72251f5408492e7ee2","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/pulls/2/commits","review_comments_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/pulls/2/comments","review_comment_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/issues/2/comments","statuses_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/statuses/4289102a51a675b14626cb89fe756589800483c2","head":{"label":"Rustamnurg:master","ref":"master","sha":"4289102a51a675b14626cb89fe756589800483c2","user":{"login":"Rustamnurg","id":14811116,"avatar_url":"https://avatars.githubusercontent.com/u/14811116?v=3","gravatar_id":"","url":"https://api.github.com/users/Rustamnurg","html_url":"https://github.com/Rustamnurg","followers_url":"https://api.github.com/users/Rustamnurg/followers","following_url":"https://api.github.com/users/Rustamnurg/following{/other_user}","gists_url":"https://api.github.com/users/Rustamnurg/gists{/gist_id}","starred_url":"https://api.github.com/users/Rustamnurg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rustamnurg/subscriptions","organizations_url":"https://api.github.com/users/Rustamnurg/orgs","repos_url":"https://api.github.com/users/Rustamnurg/repos","events_url":"https://api.github.com/users/Rustamnurg/events{/privacy}","received_events_url":"https://api.github.com/users/Rustamnurg/received_events","type":"User","site_admin":false},"repo":{"id":82317331,"name":"Swift-lesson-2","full_name":"Rustamnurg/Swift-lesson-2","owner":{"login":"Rustamnurg","id":14811116,"avatar_url":"https://avatars.githubusercontent.com/u/14811116?v=3","gravatar_id":"","url":"https://api.github.com/users/Rustamnurg","html_url":"https://github.com/Rustamnurg","followers_url":"https://api.github.com/users/Rustamnurg/followers","following_url":"https://api.github.com/users/Rustamnurg/following{/other_user}","gists_url":"https://api.github.com/users/Rustamnurg/gists{/gist_id}","starred_url":"https://api.github.com/users/Rustamnurg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rustamnurg/subscriptions","organizations_url":"https://api.github.com/users/Rustamnurg/orgs","repos_url":"https://api.github.com/users/Rustamnurg/repos","events_url":"https://api.github.com/users/Rustamnurg/events{/privacy}","received_events_url":"https://api.github.com/users/Rustamnurg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Rustamnurg/Swift-lesson-2","description":null,"fork":true,"url":"https://api.github.com/repos/Rustamnurg/Swift-lesson-2","forks_url":"https://api.github.com/repos/Rustamnurg/Swift-lesson-2/forks","keys_url":"https://api.github.com/repos/Rustamnurg/Swift-lesson-2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Rustamnurg/Swift-lesson-2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Rustamnurg/Swift-lesson-2/teams","hooks_url":"https://api.github.com/repos/Rustamnurg/Swift-lesson-2/hooks","issue_events_url":"https://api.github.com/repos/Rustamnurg/Swift-lesson-2/issues/events{/number}","events_url":"https://api.github.com/repos/Rustamnurg/Swift-lesson-2/events","assignees_url":"https://api.github.com/repos/Rustamnurg/Swift-lesson-2/assignees{/user}","branches_url":"https://api.github.com/repos/Rustamnurg/Swift-lesson-2/branches{/branch}","tags_url":"https://api.github.com/repos/Rustamnurg/Swift-lesson-2/tags","blobs_url":"https://api.github.com/repos/Rustamnurg/Swift-lesson-2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Rustamnurg/Swift-lesson-2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Rustamnurg/Swift-lesson-2/git/refs{/sha}","trees_url":"https://api.github.com/repos/Rustamnurg/Swift-lesson-2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Rustamnurg/Swift-lesson-2/statuses/{sha}","languages_url":"https://api.github.com/repos/Rustamnurg/Swift-lesson-2/languages","stargazers_url":"https://api.github.com/repos/Rustamnurg/Swift-lesson-2/stargazers","contributors_url":"https://api.github.com/repos/Rustamnurg/Swift-lesson-2/contributors","subscribers_url":"https://api.github.com/repos/Rustamnurg/Swift-lesson-2/subscribers","subscription_url":"https://api.github.com/repos/Rustamnurg/Swift-lesson-2/subscription","commits_url":"https://api.github.com/repos/Rustamnurg/Swift-lesson-2/commits{/sha}","git_commits_url":"https://api.github.com/repos/Rustamnurg/Swift-lesson-2/git/commits{/sha}","comments_url":"https://api.github.com/repos/Rustamnurg/Swift-lesson-2/comments{/number}","issue_comment_url":"https://api.github.com/repos/Rustamnurg/Swift-lesson-2/issues/comments{/number}","contents_url":"https://api.github.com/repos/Rustamnurg/Swift-lesson-2/contents/{+path}","compare_url":"https://api.github.com/repos/Rustamnurg/Swift-lesson-2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Rustamnurg/Swift-lesson-2/merges","archive_url":"https://api.github.com/repos/Rustamnurg/Swift-lesson-2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Rustamnurg/Swift-lesson-2/downloads","issues_url":"https://api.github.com/repos/Rustamnurg/Swift-lesson-2/issues{/number}","pulls_url":"https://api.github.com/repos/Rustamnurg/Swift-lesson-2/pulls{/number}","milestones_url":"https://api.github.com/repos/Rustamnurg/Swift-lesson-2/milestones{/number}","notifications_url":"https://api.github.com/repos/Rustamnurg/Swift-lesson-2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Rustamnurg/Swift-lesson-2/labels{/name}","releases_url":"https://api.github.com/repos/Rustamnurg/Swift-lesson-2/releases{/id}","deployments_url":"https://api.github.com/repos/Rustamnurg/Swift-lesson-2/deployments","created_at":"2017-02-17T16:42:00Z","updated_at":"2017-02-17T16:42:02Z","pushed_at":"2017-02-17T16:45:25Z","git_url":"git://github.com/Rustamnurg/Swift-lesson-2.git","ssh_url":"git@github.com:Rustamnurg/Swift-lesson-2.git","clone_url":"https://github.com/Rustamnurg/Swift-lesson-2.git","svn_url":"https://github.com/Rustamnurg/Swift-lesson-2","homepage":null,"size":3105,"stargazers_count":0,"watchers_count":0,"language":"Swift","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":"ZalyalovIldar:master","ref":"master","sha":"76d10500de1b7345dcc08cb9bbf3e1b8609cef2a","user":{"login":"ZalyalovIldar","id":8490823,"avatar_url":"https://avatars.githubusercontent.com/u/8490823?v=3","gravatar_id":"","url":"https://api.github.com/users/ZalyalovIldar","html_url":"https://github.com/ZalyalovIldar","followers_url":"https://api.github.com/users/ZalyalovIldar/followers","following_url":"https://api.github.com/users/ZalyalovIldar/following{/other_user}","gists_url":"https://api.github.com/users/ZalyalovIldar/gists{/gist_id}","starred_url":"https://api.github.com/users/ZalyalovIldar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZalyalovIldar/subscriptions","organizations_url":"https://api.github.com/users/ZalyalovIldar/orgs","repos_url":"https://api.github.com/users/ZalyalovIldar/repos","events_url":"https://api.github.com/users/ZalyalovIldar/events{/privacy}","received_events_url":"https://api.github.com/users/ZalyalovIldar/received_events","type":"User","site_admin":false},"repo":{"id":82074864,"name":"Swift-lesson-2","full_name":"ZalyalovIldar/Swift-lesson-2","owner":{"login":"ZalyalovIldar","id":8490823,"avatar_url":"https://avatars.githubusercontent.com/u/8490823?v=3","gravatar_id":"","url":"https://api.github.com/users/ZalyalovIldar","html_url":"https://github.com/ZalyalovIldar","followers_url":"https://api.github.com/users/ZalyalovIldar/followers","following_url":"https://api.github.com/users/ZalyalovIldar/following{/other_user}","gists_url":"https://api.github.com/users/ZalyalovIldar/gists{/gist_id}","starred_url":"https://api.github.com/users/ZalyalovIldar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZalyalovIldar/subscriptions","organizations_url":"https://api.github.com/users/ZalyalovIldar/orgs","repos_url":"https://api.github.com/users/ZalyalovIldar/repos","events_url":"https://api.github.com/users/ZalyalovIldar/events{/privacy}","received_events_url":"https://api.github.com/users/ZalyalovIldar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ZalyalovIldar/Swift-lesson-2","description":null,"fork":false,"url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2","forks_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/forks","keys_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/teams","hooks_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/hooks","issue_events_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/issues/events{/number}","events_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/events","assignees_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/assignees{/user}","branches_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/branches{/branch}","tags_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/tags","blobs_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/git/refs{/sha}","trees_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/statuses/{sha}","languages_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/languages","stargazers_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/stargazers","contributors_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/contributors","subscribers_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/subscribers","subscription_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/subscription","commits_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/commits{/sha}","git_commits_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/git/commits{/sha}","comments_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/comments{/number}","issue_comment_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/issues/comments{/number}","contents_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/contents/{+path}","compare_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/merges","archive_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/downloads","issues_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/issues{/number}","pulls_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/pulls{/number}","milestones_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/milestones{/number}","notifications_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/labels{/name}","releases_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/releases{/id}","deployments_url":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/deployments","created_at":"2017-02-15T15:23:59Z","updated_at":"2017-02-15T15:26:20Z","pushed_at":"2017-02-18T08:19:47Z","git_url":"git://github.com/ZalyalovIldar/Swift-lesson-2.git","ssh_url":"git@github.com:ZalyalovIldar/Swift-lesson-2.git","clone_url":"https://github.com/ZalyalovIldar/Swift-lesson-2.git","svn_url":"https://github.com/ZalyalovIldar/Swift-lesson-2","homepage":null,"size":9,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":3,"forks":7,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/pulls/2"},"html":{"href":"https://github.com/ZalyalovIldar/Swift-lesson-2/pull/2"},"issue":{"href":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/issues/2"},"comments":{"href":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/ZalyalovIldar/Swift-lesson-2/statuses/4289102a51a675b14626cb89fe756589800483c2"}}}}
{"actor":{"display_login":"Rustamnurg"}}