{"action":"created","comment":{"url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/pulls/comments/223186979","pull_request_review_id":162262138,"id":223186979,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMzE4Njk3OQ==","diff_hunk":"@@ -0,0 +1,112 @@\n+//\n+//  ViewController.swift\n+//  Instagram\n+//\n+//  Created by Петр on 30/09/2018.\n+//  Copyright © 2018 DreamTeam. All rights reserved.\n+//\n+\n+import UIKit\n+\n+class ViewController: UIViewController, UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout {\n+    \n+    @IBOutlet weak var mainInfoView: UIView!\n+    @IBOutlet weak var scrollView: UIScrollView!\n+    @IBOutlet weak var avatarImage: UIImageView!\n+    @IBOutlet weak var photosCollectionView: UICollectionView!\n+    @IBOutlet weak var followingLabel: UILabel!\n+    @IBOutlet weak var followersLabel: UILabel!\n+    @IBOutlet weak var publicationsCountLabel: UILabel!\n+    @IBOutlet weak var publicationsLabel: UILabel!\n+    @IBOutlet weak var editPageButton: UIButton!\n+    @IBOutlet weak var showAllPhotosButton: UIButton!\n+    @IBOutlet weak var showMarkedPhotosButton: UIButton!\n+    \n+    var currentPhotos: [Post]!\n+    let smallFontSize = 9\n+    \n+    @IBAction func showAllPhotosButtonPressed(_ sender: Any) {\n+        \n+        currentPhotos = generatePosts()\n+        photosCollectionView.reloadData()\n+    }\n+    \n+    @IBAction func showMarkedPhotosButtonPressed(_ sender: Any) {\n+        \n+        currentPhotos = generateReversedPosts()\n+        photosCollectionView.reloadData()\n+    }\n+    \n+    override func viewDidLoad() {\n+        super.viewDidLoad()\n+        // Do any additional setup after loading the view, typically from a nib.\n+        \n+        currentPhotos = generatePosts()\n+        applyStyles()\n+    }\n+    \n+    override func viewDidLayoutSubviews() {\n+        \n+        photosCollectionView.frame.size.height = photosCollectionView.contentSize.height\n+        scrollView.contentSize.height = photosCollectionView.contentSize.height + mainInfoView.frame.size.height\n+    }\n+    \n+    func applyStyles() {\n+        \n+        avatarImage.image = UIImage(named: \"markAvatar\")\n+        avatarImage.layer.masksToBounds = false\n+        avatarImage.layer.cornerRadius = avatarImage.frame.height/2\n+        avatarImage.clipsToBounds = true\n+        \n+        editPageButton.layer.borderWidth = 0.3\n+        editPageButton.layer.borderColor = UIColor.black.cgColor\n+        \n+        showAllPhotosButton.layer.borderWidth = 0.2\n+        showAllPhotosButton.layer.borderColor = UIColor.black.cgColor\n+        \n+        showMarkedPhotosButton.layer.borderWidth = 0.2\n+        showMarkedPhotosButton.layer.borderColor = UIColor.black.cgColor\n+        \n+        if view.frame.width <= 375 {","path":"Instagram/ViewController.swift","position":70,"original_position":70,"commit_id":"cb94ed594915af5ad6024b6b5463546886d66242","original_commit_id":"cb94ed594915af5ad6024b6b5463546886d66242","user":{"login":"ZalyalovIldar","id":8490823,"node_id":"MDQ6VXNlcjg0OTA4MjM=","avatar_url":"https://avatars3.githubusercontent.com/u/8490823?v=4","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},"body":"константу в константы)","created_at":"2018-10-06T16:23:47Z","updated_at":"2018-10-06T16:28:05Z","html_url":"https://github.com/ZalyalovIldar/UITableViewLesson3/pull/3#discussion_r223186979","pull_request_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/pulls/3","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/pulls/comments/223186979"},"html":{"href":"https://github.com/ZalyalovIldar/UITableViewLesson3/pull/3#discussion_r223186979"},"pull_request":{"href":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/pulls/3","id":219222854,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5MjIyODU0","html_url":"https://github.com/ZalyalovIldar/UITableViewLesson3/pull/3","diff_url":"https://github.com/ZalyalovIldar/UITableViewLesson3/pull/3.diff","patch_url":"https://github.com/ZalyalovIldar/UITableViewLesson3/pull/3.patch","issue_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/issues/3","number":3,"state":"open","locked":false,"title":"Instagram clone","user":{"login":"novpeter","id":26308259,"node_id":"MDQ6VXNlcjI2MzA4MjU5","avatar_url":"https://avatars1.githubusercontent.com/u/26308259?v=4","gravatar_id":"","url":"https://api.github.com/users/novpeter","html_url":"https://github.com/novpeter","followers_url":"https://api.github.com/users/novpeter/followers","following_url":"https://api.github.com/users/novpeter/following{/other_user}","gists_url":"https://api.github.com/users/novpeter/gists{/gist_id}","starred_url":"https://api.github.com/users/novpeter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/novpeter/subscriptions","organizations_url":"https://api.github.com/users/novpeter/orgs","repos_url":"https://api.github.com/users/novpeter/repos","events_url":"https://api.github.com/users/novpeter/events{/privacy}","received_events_url":"https://api.github.com/users/novpeter/received_events","type":"User","site_admin":false},"body":"- Сделал только два таба с помощью кнопок\r\n- Подобрал размер шрифта для 5/SE","created_at":"2018-09-30T19:35:05Z","updated_at":"2018-10-06T16:28:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cf4932900749084e859eecc105b43acdf21060ba","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/pulls/3/commits","review_comments_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/pulls/3/comments","review_comment_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/issues/3/comments","statuses_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/statuses/cb94ed594915af5ad6024b6b5463546886d66242","head":{"label":"novpeter:master","ref":"master","sha":"cb94ed594915af5ad6024b6b5463546886d66242","user":{"login":"novpeter","id":26308259,"node_id":"MDQ6VXNlcjI2MzA4MjU5","avatar_url":"https://avatars1.githubusercontent.com/u/26308259?v=4","gravatar_id":"","url":"https://api.github.com/users/novpeter","html_url":"https://github.com/novpeter","followers_url":"https://api.github.com/users/novpeter/followers","following_url":"https://api.github.com/users/novpeter/following{/other_user}","gists_url":"https://api.github.com/users/novpeter/gists{/gist_id}","starred_url":"https://api.github.com/users/novpeter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/novpeter/subscriptions","organizations_url":"https://api.github.com/users/novpeter/orgs","repos_url":"https://api.github.com/users/novpeter/repos","events_url":"https://api.github.com/users/novpeter/events{/privacy}","received_events_url":"https://api.github.com/users/novpeter/received_events","type":"User","site_admin":false},"repo":{"id":150944933,"node_id":"MDEwOlJlcG9zaXRvcnkxNTA5NDQ5MzM=","name":"UITableViewLesson3","full_name":"novpeter/UITableViewLesson3","private":false,"owner":{"login":"novpeter","id":26308259,"node_id":"MDQ6VXNlcjI2MzA4MjU5","avatar_url":"https://avatars1.githubusercontent.com/u/26308259?v=4","gravatar_id":"","url":"https://api.github.com/users/novpeter","html_url":"https://github.com/novpeter","followers_url":"https://api.github.com/users/novpeter/followers","following_url":"https://api.github.com/users/novpeter/following{/other_user}","gists_url":"https://api.github.com/users/novpeter/gists{/gist_id}","starred_url":"https://api.github.com/users/novpeter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/novpeter/subscriptions","organizations_url":"https://api.github.com/users/novpeter/orgs","repos_url":"https://api.github.com/users/novpeter/repos","events_url":"https://api.github.com/users/novpeter/events{/privacy}","received_events_url":"https://api.github.com/users/novpeter/received_events","type":"User","site_admin":false},"html_url":"https://github.com/novpeter/UITableViewLesson3","description":null,"fork":true,"url":"https://api.github.com/repos/novpeter/UITableViewLesson3","forks_url":"https://api.github.com/repos/novpeter/UITableViewLesson3/forks","keys_url":"https://api.github.com/repos/novpeter/UITableViewLesson3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/novpeter/UITableViewLesson3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/novpeter/UITableViewLesson3/teams","hooks_url":"https://api.github.com/repos/novpeter/UITableViewLesson3/hooks","issue_events_url":"https://api.github.com/repos/novpeter/UITableViewLesson3/issues/events{/number}","events_url":"https://api.github.com/repos/novpeter/UITableViewLesson3/events","assignees_url":"https://api.github.com/repos/novpeter/UITableViewLesson3/assignees{/user}","branches_url":"https://api.github.com/repos/novpeter/UITableViewLesson3/branches{/branch}","tags_url":"https://api.github.com/repos/novpeter/UITableViewLesson3/tags","blobs_url":"https://api.github.com/repos/novpeter/UITableViewLesson3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/novpeter/UITableViewLesson3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/novpeter/UITableViewLesson3/git/refs{/sha}","trees_url":"https://api.github.com/repos/novpeter/UITableViewLesson3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/novpeter/UITableViewLesson3/statuses/{sha}","languages_url":"https://api.github.com/repos/novpeter/UITableViewLesson3/languages","stargazers_url":"https://api.github.com/repos/novpeter/UITableViewLesson3/stargazers","contributors_url":"https://api.github.com/repos/novpeter/UITableViewLesson3/contributors","subscribers_url":"https://api.github.com/repos/novpeter/UITableViewLesson3/subscribers","subscription_url":"https://api.github.com/repos/novpeter/UITableViewLesson3/subscription","commits_url":"https://api.github.com/repos/novpeter/UITableViewLesson3/commits{/sha}","git_commits_url":"https://api.github.com/repos/novpeter/UITableViewLesson3/git/commits{/sha}","comments_url":"https://api.github.com/repos/novpeter/UITableViewLesson3/comments{/number}","issue_comment_url":"https://api.github.com/repos/novpeter/UITableViewLesson3/issues/comments{/number}","contents_url":"https://api.github.com/repos/novpeter/UITableViewLesson3/contents/{+path}","compare_url":"https://api.github.com/repos/novpeter/UITableViewLesson3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/novpeter/UITableViewLesson3/merges","archive_url":"https://api.github.com/repos/novpeter/UITableViewLesson3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/novpeter/UITableViewLesson3/downloads","issues_url":"https://api.github.com/repos/novpeter/UITableViewLesson3/issues{/number}","pulls_url":"https://api.github.com/repos/novpeter/UITableViewLesson3/pulls{/number}","milestones_url":"https://api.github.com/repos/novpeter/UITableViewLesson3/milestones{/number}","notifications_url":"https://api.github.com/repos/novpeter/UITableViewLesson3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/novpeter/UITableViewLesson3/labels{/name}","releases_url":"https://api.github.com/repos/novpeter/UITableViewLesson3/releases{/id}","deployments_url":"https://api.github.com/repos/novpeter/UITableViewLesson3/deployments","created_at":"2018-09-30T07:54:22Z","updated_at":"2018-09-30T19:32:49Z","pushed_at":"2018-09-30T19:32:47Z","git_url":"git://github.com/novpeter/UITableViewLesson3.git","ssh_url":"git@github.com:novpeter/UITableViewLesson3.git","clone_url":"https://github.com/novpeter/UITableViewLesson3.git","svn_url":"https://github.com/novpeter/UITableViewLesson3","homepage":null,"size":5744,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ZalyalovIldar:master","ref":"master","sha":"602cd35a9b0257502afc1763535ce8a758106347","user":{"login":"ZalyalovIldar","id":8490823,"node_id":"MDQ6VXNlcjg0OTA4MjM=","avatar_url":"https://avatars3.githubusercontent.com/u/8490823?v=4","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":150143139,"node_id":"MDEwOlJlcG9zaXRvcnkxNTAxNDMxMzk=","name":"UITableViewLesson3","full_name":"ZalyalovIldar/UITableViewLesson3","private":false,"owner":{"login":"ZalyalovIldar","id":8490823,"node_id":"MDQ6VXNlcjg0OTA4MjM=","avatar_url":"https://avatars3.githubusercontent.com/u/8490823?v=4","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},"html_url":"https://github.com/ZalyalovIldar/UITableViewLesson3","description":null,"fork":false,"url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3","forks_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/forks","keys_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/teams","hooks_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/hooks","issue_events_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/issues/events{/number}","events_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/events","assignees_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/assignees{/user}","branches_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/branches{/branch}","tags_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/tags","blobs_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/git/refs{/sha}","trees_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/statuses/{sha}","languages_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/languages","stargazers_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/stargazers","contributors_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/contributors","subscribers_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/subscribers","subscription_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/subscription","commits_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/commits{/sha}","git_commits_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/git/commits{/sha}","comments_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/comments{/number}","issue_comment_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/issues/comments{/number}","contents_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/contents/{+path}","compare_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/merges","archive_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/downloads","issues_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/issues{/number}","pulls_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/pulls{/number}","milestones_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/milestones{/number}","notifications_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/labels{/name}","releases_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/releases{/id}","deployments_url":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/deployments","created_at":"2018-09-24T17:40:30Z","updated_at":"2018-09-24T17:57:46Z","pushed_at":"2018-10-03T13:12:09Z","git_url":"git://github.com/ZalyalovIldar/UITableViewLesson3.git","ssh_url":"git@github.com:ZalyalovIldar/UITableViewLesson3.git","clone_url":"https://github.com/ZalyalovIldar/UITableViewLesson3.git","svn_url":"https://github.com/ZalyalovIldar/UITableViewLesson3","homepage":null,"size":479,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":5,"license":null,"forks":8,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/pulls/3"},"html":{"href":"https://github.com/ZalyalovIldar/UITableViewLesson3/pull/3"},"issue":{"href":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/issues/3"},"comments":{"href":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/ZalyalovIldar/UITableViewLesson3/statuses/cb94ed594915af5ad6024b6b5463546886d66242"}},"author_association":"NONE"}}
{"actor":{"display_login":"ZalyalovIldar"}}