From 72f6d8488e55cfc2ff0d90e1e149298cb40c65c2 Mon Sep 17 00:00:00 2001 From: ellyheetov Date: Thu, 10 Jun 2021 16:28:20 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20Photo=20Album=20Modal=20View=E1=84=8B?= =?UTF-8?q?=E1=85=A6=20Navigation=20Bar=20=E1=84=8E=E1=85=AE=E1=84=80?= =?UTF-8?q?=E1=85=A1=20(#27)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../NewIssue/IssueEditViewController.swift | 4 +-- .../Photo/PhotoViewController.swift | 27 +++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 iOS/issue-tracker/Photo/PhotoViewController.swift diff --git a/iOS/issue-tracker/NewIssue/IssueEditViewController.swift b/iOS/issue-tracker/NewIssue/IssueEditViewController.swift index 312b49986..a181b9879 100644 --- a/iOS/issue-tracker/NewIssue/IssueEditViewController.swift +++ b/iOS/issue-tracker/NewIssue/IssueEditViewController.swift @@ -41,8 +41,8 @@ class IssueEditViewController: UIViewController { func insertPhoto(){ let photoSelectViewController = PhotoViewController .instantiate(name: "Main", bundle: Bundle.main) - - self.present(photoSelectViewController, animated: true) + let navigationViewController = UINavigationController(rootViewController: photoSelectViewController) + self.present(navigationViewController, animated: true) } } extension IssueEditViewController: UITextViewDelegate { diff --git a/iOS/issue-tracker/Photo/PhotoViewController.swift b/iOS/issue-tracker/Photo/PhotoViewController.swift new file mode 100644 index 000000000..41adae189 --- /dev/null +++ b/iOS/issue-tracker/Photo/PhotoViewController.swift @@ -0,0 +1,27 @@ +// +// PhotoViewController.swift +// issue-tracker +// +// Created by 박혜원 on 2021/06/10. +// + +import UIKit + +class PhotoViewController: UIViewController, ReuseIdentity { + + @IBOutlet weak var album: UICollectionView! + + private var photoDataSource = PhotoDataSource() + + override func viewDidLoad() { + super.viewDidLoad() + + PhotoManager.shared.requestPhotos() + PhotoManager.shared.authorization() + + self.album.dataSource = photoDataSource + + self.album.reloadData() + } + +}