Skip to content

Commit

Permalink
feat: navigation Bar 우측 추가하기 버튼 추가 (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
ellyheetov committed Jun 10, 2021
1 parent 72f6d84 commit cbc3c7d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
5 changes: 3 additions & 2 deletions iOS/issue-tracker/NewIssue/IssueEditViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ class IssueEditViewController: UIViewController {
func insertPhoto(){
let photoSelectViewController = PhotoViewController
.instantiate(name: "Main", bundle: Bundle.main)
let navigationViewController = UINavigationController(rootViewController: photoSelectViewController)
self.present(navigationViewController, animated: true)
let navigationVC = UINavigationController(rootViewController: photoSelectViewController)
navigationVC.title = "사진"
self.present(navigationVC, animated: true)
}
}
extension IssueEditViewController: UITextViewDelegate {
Expand Down
13 changes: 13 additions & 0 deletions iOS/issue-tracker/Photo/PhotoViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class PhotoViewController: UIViewController, ReuseIdentity {

override func viewDidLoad() {
super.viewDidLoad()
configureNavigationItem()

PhotoManager.shared.requestPhotos()
PhotoManager.shared.authorization()
Expand All @@ -24,4 +25,16 @@ class PhotoViewController: UIViewController, ReuseIdentity {
self.album.reloadData()
}

private func configureNavigationItem(){
let rightButton = UIBarButtonItem(title: "추가",
style: .done,
target: self,
action: #selector(addPhotoToTextView))
self.navigationItem.rightBarButtonItem = rightButton
}

@objc
func addPhotoToTextView(){

}
}

0 comments on commit cbc3c7d

Please sign in to comment.