-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
647 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
104 changes: 104 additions & 0 deletions
104
DontBe-iOS/DontBe-iOS/Presentation/Post/ViewControllers/WriteReplyViewController.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
// | ||
// WriteReplyViewController.swift | ||
// DontBe-iOS | ||
// | ||
// Created by yeonsu on 1/14/24. | ||
// | ||
|
||
import UIKit | ||
|
||
final class WriteReplyViewController: UIViewController { | ||
|
||
// MARK: - Properties | ||
|
||
// MARK: - UI Components | ||
|
||
private let myView = WriteReplyView() | ||
|
||
// MARK: - Life Cycles | ||
|
||
override func loadView() { | ||
super.loadView() | ||
|
||
view = myView | ||
} | ||
|
||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
|
||
getAPI() | ||
setUI() | ||
setHierarchy() | ||
setLayout() | ||
setDelegate() | ||
setBottomSheet() | ||
setNavigationBarButtonItem() | ||
} | ||
} | ||
|
||
// MARK: - Extensions | ||
|
||
extension WriteReplyViewController { | ||
private func setUI() { | ||
myView.backgroundColor = .donWhite | ||
title = "답글달기" | ||
} | ||
|
||
private func setHierarchy() { | ||
|
||
} | ||
|
||
private func setLayout() { | ||
|
||
} | ||
|
||
private func setDelegate() { | ||
|
||
} | ||
|
||
private func setBottomSheet() { | ||
/// 밑으로 내려도 dismiss되지 않는 옵션 값 | ||
isModalInPresentation = true | ||
|
||
if let sheet = sheetPresentationController { | ||
sheet.detents = [.medium(), .large()] | ||
sheet.selectedDetentIdentifier = .large | ||
sheet.largestUndimmedDetentIdentifier = .medium | ||
sheet.prefersScrollingExpandsWhenScrolledToEdge = true | ||
sheet.prefersGrabberVisible = false | ||
} | ||
} | ||
|
||
private func setNavigationBarButtonItem() { | ||
let cancelButton = UIBarButtonItem(title: "취소", primaryAction: .init(handler: { [weak self] _Arg in | ||
self?.dismiss(animated: true) | ||
})) | ||
navigationItem.leftBarButtonItem = cancelButton | ||
let attributes: [NSAttributedString.Key: Any] = [ | ||
.foregroundColor: UIColor.donGray11, | ||
.font: UIFont.font(.caption4) | ||
] | ||
cancelButton.setTitleTextAttributes(attributes, for: .normal) | ||
cancelButton.setTitleTextAttributes(attributes, for: .highlighted) | ||
} | ||
} | ||
|
||
// MARK: - Network | ||
|
||
extension WriteReplyViewController { | ||
private func getAPI() { | ||
|
||
} | ||
} | ||
|
||
//extension ExampleViewController: UICollectionViewDelegate { | ||
// | ||
//} | ||
// | ||
//extension ExampleViewController: UICollectionViewDataSource { | ||
// | ||
//} | ||
// | ||
//extension ExampleViewController: UICollectionViewFlowLayout { | ||
// | ||
//} |
58 changes: 58 additions & 0 deletions
58
DontBe-iOS/DontBe-iOS/Presentation/Post/Views/PostReplyCollectionFooterView.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
// | ||
// PostReplyCollectionFooterView.swift | ||
// DontBe-iOS | ||
// | ||
// Created by yeonsu on 1/14/24. | ||
// | ||
|
||
import UIKit | ||
|
||
final class PostReplyCollectionFooterView: UICollectionReusableView { | ||
|
||
// MARK: - Properties | ||
|
||
static let identifier = "PostReplyCollectionFooterView" | ||
|
||
// MARK: - UI Components | ||
|
||
private let footerView: UIView = { | ||
let view = UIView() | ||
view.backgroundColor = .orange | ||
return view | ||
}() | ||
|
||
// MARK: - Life Cycles | ||
|
||
override init(frame: CGRect) { | ||
super.init(frame: frame) | ||
|
||
setUI() | ||
setHierarchy() | ||
setLayout() | ||
} | ||
|
||
@available(*, unavailable) | ||
required init?(coder: NSCoder) { | ||
fatalError("init(coder:) has not been implemented") | ||
} | ||
} | ||
|
||
// MARK: - Extensions | ||
|
||
extension PostReplyCollectionFooterView { | ||
func setUI() { | ||
self.backgroundColor = .donGray1 | ||
} | ||
|
||
func setHierarchy() { | ||
self.addSubviews(footerView) | ||
} | ||
|
||
func setLayout() { | ||
footerView.snp.makeConstraints { | ||
$0.height.equalTo(2.adjusted) | ||
|
||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.