{"action":"created","comment":{"url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/pulls/comments/56804834","id":56804834,"diff_hunk":"@@ -0,0 +1,190 @@\n+//\n+//  ViewController.swift\n+//  Telescope\n+//\n+//  Created by Artem Abramov EPAM on 09/03/16.\n+//  Copyright © 2016 EPAM. All rights reserved.\n+//\n+\n+import UIKit\n+\n+class AuthorizationViewController: UIViewController, UITextFieldDelegate {\n+\n+    @IBOutlet weak var emailField: TSTextField!\n+    @IBOutlet weak var pswField: TSTextField!\n+    @IBOutlet weak var signInButton: UIButton!\n+    @IBOutlet weak var signUpLabel: UILabel!\n+    \n+    override func viewDidLoad() {\n+        super.viewDidLoad()\n+        \n+        configurateView()\n+        \n+        NSNotificationCenter.defaultCenter().addObserver(self, selector: \"didShowKeyboard:\", name: UIKeyboardDidShowNotification, object: nil)\n+        NSNotificationCenter.defaultCenter().addObserver(self, selector: \"didHideKeyboard:\", name: UIKeyboardDidHideNotification, object: nil)\n+    }\n+    \n+    override func didReceiveMemoryWarning() {\n+        super.didReceiveMemoryWarning()\n+        // Dispose of any resources that can be recreated.\n+    }\n+    \n+    private func configurateView(){\n+        \n+        drawBackground()\n+        \n+        signInButton.layer.borderWidth = 1\n+        signInButton.layer.cornerRadius = 30\n+        signInButton.layer.borderColor = UIColor(red: 163/255.0, green: 198/255.0, blue: 68/255.0, alpha: 1).CGColor\n+        \n+        \n+        emailField.delegate = self\n+//        emailField.setLeftImage(\"Email\")\n+        pswField.delegate = self\n+//        pswField.setLeftImage(\"Password\")\n+        \n+\n+        let gesture = UITapGestureRecognizer(target: self, action: \"signUpClicked:\")\n+        signUpLabel.addGestureRecognizer(gesture)\n+    }\n+    \n+    private func drawBackground(){\n+        \n+        let value = self.view.frame.width > self.view.frame.height ? self.view.frame.width : self.view.frame.height\n+        \n+        let layer = CAGradientLayer()\n+        layer.frame = CGRectMake(0, 0, value, value)\n+        \n+        let firstColor = UIColor(red: 46/255, green: 46/255, blue: 46/255, alpha: 0).CGColor as CGColorRef\n+        let secondColor = UIColor(red: 255, green: 255, blue: 255, alpha: 0.1).CGColor as CGColorRef\n+        layer.colors = [firstColor, secondColor, firstColor]\n+        layer.locations = [0, 0.75, 1]\n+        self.view.layer.addSublayer(layer)\n+    }\n+    \n+    func textFieldShouldReturn(textField: UITextField) -> Bool {\n+        \n+        (textField as! TSTextField).shouldReturn()\n+        \n+        if textField == pswField {\n+            signInClicked(signInButton)\n+        }\n+        \n+        return false\n+    }\n+    \n+    override func preferredStatusBarStyle() -> UIStatusBarStyle {\n+        return .LightContent\n+    }\n+\n+    @IBAction func signInClicked(sender: AnyObject) {\n+        \n+        let isValid = validateFields()\n+        guard isValid else{\n+            return\n+        }\n+        \n+        UIApplication.sharedApplication().networkActivityIndicatorVisible = true","path":"Telescope/AuthorizationViewController.swift","position":87,"original_position":87,"commit_id":"14464be8ac483413ee21333f185647192bed187b","original_commit_id":"14464be8ac483413ee21333f185647192bed187b","user":{"login":"NSArtem","id":970787,"avatar_url":"https://avatars.githubusercontent.com/u/970787?v=3","gravatar_id":"","url":"https://api.github.com/users/NSArtem","html_url":"https://github.com/NSArtem","followers_url":"https://api.github.com/users/NSArtem/followers","following_url":"https://api.github.com/users/NSArtem/following{/other_user}","gists_url":"https://api.github.com/users/NSArtem/gists{/gist_id}","starred_url":"https://api.github.com/users/NSArtem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NSArtem/subscriptions","organizations_url":"https://api.github.com/users/NSArtem/orgs","repos_url":"https://api.github.com/users/NSArtem/repos","events_url":"https://api.github.com/users/NSArtem/events{/privacy}","received_events_url":"https://api.github.com/users/NSArtem/received_events","type":"User","site_admin":false},"body":"That belongs to network layer","created_at":"2016-03-21T10:50:51Z","updated_at":"2016-03-21T10:50:51Z","html_url":"https://github.com/EPAM-SPB/Telescope-iOS/pull/1#discussion_r56804834","pull_request_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/pulls/comments/56804834"},"html":{"href":"https://github.com/EPAM-SPB/Telescope-iOS/pull/1#discussion_r56804834"},"pull_request":{"href":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/pulls/1","id":63544687,"html_url":"https://github.com/EPAM-SPB/Telescope-iOS/pull/1","diff_url":"https://github.com/EPAM-SPB/Telescope-iOS/pull/1.diff","patch_url":"https://github.com/EPAM-SPB/Telescope-iOS/pull/1.patch","issue_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/issues/1","number":1,"state":"open","locked":false,"title":"Authorisation View- Pull Request","user":{"login":"saaleksandrov","id":6703790,"avatar_url":"https://avatars.githubusercontent.com/u/6703790?v=3","gravatar_id":"","url":"https://api.github.com/users/saaleksandrov","html_url":"https://github.com/saaleksandrov","followers_url":"https://api.github.com/users/saaleksandrov/followers","following_url":"https://api.github.com/users/saaleksandrov/following{/other_user}","gists_url":"https://api.github.com/users/saaleksandrov/gists{/gist_id}","starred_url":"https://api.github.com/users/saaleksandrov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saaleksandrov/subscriptions","organizations_url":"https://api.github.com/users/saaleksandrov/orgs","repos_url":"https://api.github.com/users/saaleksandrov/repos","events_url":"https://api.github.com/users/saaleksandrov/events{/privacy}","received_events_url":"https://api.github.com/users/saaleksandrov/received_events","type":"User","site_admin":false},"body":"Just first piece of code with aurhorization for `review`","created_at":"2016-03-21T10:40:39Z","updated_at":"2016-03-21T10:50:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/pulls/1/commits","review_comments_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/pulls/1/comments","review_comment_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/issues/1/comments","statuses_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/statuses/14464be8ac483413ee21333f185647192bed187b","head":{"label":"EPAM-SPB:feature/authorizationView","ref":"feature/authorizationView","sha":"14464be8ac483413ee21333f185647192bed187b","user":{"login":"EPAM-SPB","id":17471287,"avatar_url":"https://avatars.githubusercontent.com/u/17471287?v=3","gravatar_id":"","url":"https://api.github.com/users/EPAM-SPB","html_url":"https://github.com/EPAM-SPB","followers_url":"https://api.github.com/users/EPAM-SPB/followers","following_url":"https://api.github.com/users/EPAM-SPB/following{/other_user}","gists_url":"https://api.github.com/users/EPAM-SPB/gists{/gist_id}","starred_url":"https://api.github.com/users/EPAM-SPB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EPAM-SPB/subscriptions","organizations_url":"https://api.github.com/users/EPAM-SPB/orgs","repos_url":"https://api.github.com/users/EPAM-SPB/repos","events_url":"https://api.github.com/users/EPAM-SPB/events{/privacy}","received_events_url":"https://api.github.com/users/EPAM-SPB/received_events","type":"Organization","site_admin":false},"repo":{"id":53484251,"name":"Telescope-iOS","full_name":"EPAM-SPB/Telescope-iOS","owner":{"login":"EPAM-SPB","id":17471287,"avatar_url":"https://avatars.githubusercontent.com/u/17471287?v=3","gravatar_id":"","url":"https://api.github.com/users/EPAM-SPB","html_url":"https://github.com/EPAM-SPB","followers_url":"https://api.github.com/users/EPAM-SPB/followers","following_url":"https://api.github.com/users/EPAM-SPB/following{/other_user}","gists_url":"https://api.github.com/users/EPAM-SPB/gists{/gist_id}","starred_url":"https://api.github.com/users/EPAM-SPB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EPAM-SPB/subscriptions","organizations_url":"https://api.github.com/users/EPAM-SPB/orgs","repos_url":"https://api.github.com/users/EPAM-SPB/repos","events_url":"https://api.github.com/users/EPAM-SPB/events{/privacy}","received_events_url":"https://api.github.com/users/EPAM-SPB/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/EPAM-SPB/Telescope-iOS","description":"iOS client for internal EPAM Telescope social network","fork":false,"url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS","forks_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/forks","keys_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/teams","hooks_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/hooks","issue_events_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/issues/events{/number}","events_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/events","assignees_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/assignees{/user}","branches_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/branches{/branch}","tags_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/tags","blobs_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/git/refs{/sha}","trees_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/statuses/{sha}","languages_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/languages","stargazers_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/stargazers","contributors_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/contributors","subscribers_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/subscribers","subscription_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/subscription","commits_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/commits{/sha}","git_commits_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/git/commits{/sha}","comments_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/comments{/number}","issue_comment_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/issues/comments{/number}","contents_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/contents/{+path}","compare_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/merges","archive_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/downloads","issues_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/issues{/number}","pulls_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/pulls{/number}","milestones_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/milestones{/number}","notifications_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/labels{/name}","releases_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/releases{/id}","deployments_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/deployments","created_at":"2016-03-09T09:14:26Z","updated_at":"2016-03-09T09:24:03Z","pushed_at":"2016-03-21T10:40:40Z","git_url":"git://github.com/EPAM-SPB/Telescope-iOS.git","ssh_url":"git@github.com:EPAM-SPB/Telescope-iOS.git","clone_url":"https://github.com/EPAM-SPB/Telescope-iOS.git","svn_url":"https://github.com/EPAM-SPB/Telescope-iOS","homepage":null,"size":89,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"develop"}},"base":{"label":"EPAM-SPB:develop","ref":"develop","sha":"dedbe0214e50c4e66e67a10b6569e6e71d53a41e","user":{"login":"EPAM-SPB","id":17471287,"avatar_url":"https://avatars.githubusercontent.com/u/17471287?v=3","gravatar_id":"","url":"https://api.github.com/users/EPAM-SPB","html_url":"https://github.com/EPAM-SPB","followers_url":"https://api.github.com/users/EPAM-SPB/followers","following_url":"https://api.github.com/users/EPAM-SPB/following{/other_user}","gists_url":"https://api.github.com/users/EPAM-SPB/gists{/gist_id}","starred_url":"https://api.github.com/users/EPAM-SPB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EPAM-SPB/subscriptions","organizations_url":"https://api.github.com/users/EPAM-SPB/orgs","repos_url":"https://api.github.com/users/EPAM-SPB/repos","events_url":"https://api.github.com/users/EPAM-SPB/events{/privacy}","received_events_url":"https://api.github.com/users/EPAM-SPB/received_events","type":"Organization","site_admin":false},"repo":{"id":53484251,"name":"Telescope-iOS","full_name":"EPAM-SPB/Telescope-iOS","owner":{"login":"EPAM-SPB","id":17471287,"avatar_url":"https://avatars.githubusercontent.com/u/17471287?v=3","gravatar_id":"","url":"https://api.github.com/users/EPAM-SPB","html_url":"https://github.com/EPAM-SPB","followers_url":"https://api.github.com/users/EPAM-SPB/followers","following_url":"https://api.github.com/users/EPAM-SPB/following{/other_user}","gists_url":"https://api.github.com/users/EPAM-SPB/gists{/gist_id}","starred_url":"https://api.github.com/users/EPAM-SPB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EPAM-SPB/subscriptions","organizations_url":"https://api.github.com/users/EPAM-SPB/orgs","repos_url":"https://api.github.com/users/EPAM-SPB/repos","events_url":"https://api.github.com/users/EPAM-SPB/events{/privacy}","received_events_url":"https://api.github.com/users/EPAM-SPB/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/EPAM-SPB/Telescope-iOS","description":"iOS client for internal EPAM Telescope social network","fork":false,"url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS","forks_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/forks","keys_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/teams","hooks_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/hooks","issue_events_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/issues/events{/number}","events_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/events","assignees_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/assignees{/user}","branches_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/branches{/branch}","tags_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/tags","blobs_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/git/refs{/sha}","trees_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/statuses/{sha}","languages_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/languages","stargazers_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/stargazers","contributors_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/contributors","subscribers_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/subscribers","subscription_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/subscription","commits_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/commits{/sha}","git_commits_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/git/commits{/sha}","comments_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/comments{/number}","issue_comment_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/issues/comments{/number}","contents_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/contents/{+path}","compare_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/merges","archive_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/downloads","issues_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/issues{/number}","pulls_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/pulls{/number}","milestones_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/milestones{/number}","notifications_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/labels{/name}","releases_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/releases{/id}","deployments_url":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/deployments","created_at":"2016-03-09T09:14:26Z","updated_at":"2016-03-09T09:24:03Z","pushed_at":"2016-03-21T10:40:40Z","git_url":"git://github.com/EPAM-SPB/Telescope-iOS.git","ssh_url":"git@github.com:EPAM-SPB/Telescope-iOS.git","clone_url":"https://github.com/EPAM-SPB/Telescope-iOS.git","svn_url":"https://github.com/EPAM-SPB/Telescope-iOS","homepage":null,"size":89,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/pulls/1"},"html":{"href":"https://github.com/EPAM-SPB/Telescope-iOS/pull/1"},"issue":{"href":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/issues/1"},"comments":{"href":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/EPAM-SPB/Telescope-iOS/statuses/14464be8ac483413ee21333f185647192bed187b"}}}}