-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fix] 코딩 컨벤션 맞추기 #169
[fix] 코딩 컨벤션 맞추기 #169
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,42 +29,22 @@ class HomeViewController: BaseViewController { | |
self.view = rootView | ||
} | ||
|
||
override func viewWillAppear(_ animated: Bool) { | ||
super.viewWillAppear(false) | ||
navigationController?.isNavigationBarHidden = true | ||
} | ||
|
||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
|
||
view.backgroundColor = .white | ||
register() | ||
setupDelegate() | ||
setupAction() | ||
|
||
register() | ||
updateUI() | ||
updateUpcomingPromise() | ||
viewModel.dummy() | ||
} | ||
|
||
|
||
// MARK: - Function | ||
|
||
private func register() { | ||
rootView.upcomingPromiseView.register(UpcomingPromiseCollectionViewCell.self, | ||
forCellWithReuseIdentifier: UpcomingPromiseCollectionViewCell.reuseIdentifier | ||
) | ||
} | ||
|
||
override func setupDelegate() { | ||
rootView.upcomingPromiseView.delegate = self | ||
rootView.upcomingPromiseView.dataSource = self | ||
rootView.scrollView.delegate = self | ||
override func viewWillAppear(_ animated: Bool) { | ||
super.viewWillAppear(animated) | ||
navigationController?.isNavigationBarHidden = true | ||
} | ||
|
||
|
||
// MARK: - Function | ||
|
||
override func setupAction() { | ||
rootView.todayPromiseView.prepareButton.addTarget( | ||
self, | ||
|
@@ -83,6 +63,24 @@ class HomeViewController: BaseViewController { | |
) | ||
} | ||
|
||
override func setupDelegate() { | ||
rootView.upcomingPromiseView.delegate = self | ||
rootView.upcomingPromiseView.dataSource = self | ||
rootView.scrollView.delegate = self | ||
} | ||
|
||
|
||
// MARK: - Function | ||
|
||
private func register() { | ||
rootView.upcomingPromiseView.register(UpcomingPromiseCollectionViewCell.self, | ||
forCellWithReuseIdentifier: UpcomingPromiseCollectionViewCell.reuseIdentifier | ||
) | ||
} | ||
|
||
|
||
// MARK: - Function | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Function 마크 주석이 두 번 들어가서 이 주석은 삭제해도 좋을 것 같습니다! |
||
|
||
private func setDisableButton(_ sender: UIButton) { | ||
sender.setTitleColor(.gray3, for: .normal) | ||
sender.layer.borderColor = UIColor.gray3.cgColor | ||
|
@@ -222,32 +220,49 @@ class HomeViewController: BaseViewController { | |
} | ||
|
||
|
||
// MARK: - UICollectionViewDelegate | ||
// MARK: - UICollectionViewDelegateFlowLayout | ||
|
||
extension HomeViewController: UICollectionViewDelegateFlowLayout { | ||
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, | ||
sizeForItemAt indexPath: IndexPath) -> CGSize { | ||
func collectionView( | ||
_ collectionView: UICollectionView, | ||
layout collectionViewLayout: UICollectionViewLayout, | ||
sizeForItemAt indexPath: IndexPath | ||
) -> CGSize { | ||
return CGSize(width: cellWidth, height: cellHeight) | ||
} | ||
|
||
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, | ||
minimumLineSpacingForSectionAt section: Int) -> CGFloat { | ||
func collectionView( | ||
_ collectionView: UICollectionView, | ||
layout collectionViewLayout: UICollectionViewLayout, | ||
minimumLineSpacingForSectionAt section: Int | ||
) -> CGFloat { | ||
return contentInterSpacing | ||
} | ||
|
||
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets { | ||
func collectionView( | ||
_ collectionView: UICollectionView, | ||
layout collectionViewLayout: UICollectionViewLayout, | ||
insetForSectionAt section: Int | ||
) -> UIEdgeInsets { | ||
return contentInset | ||
} | ||
} | ||
|
||
extension HomeViewController: UICollectionViewDataSource { | ||
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { | ||
func collectionView( | ||
_ collectionView: UICollectionView, | ||
numberOfItemsInSection section: Int | ||
) -> Int { | ||
return viewModel.upcomingPromiseData.value.count | ||
} | ||
|
||
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { | ||
func collectionView( | ||
_ collectionView: UICollectionView, | ||
cellForItemAt indexPath: IndexPath | ||
) -> UICollectionViewCell { | ||
guard let cell = collectionView.dequeueReusableCell( | ||
withReuseIdentifier: UpcomingPromiseCollectionViewCell.reuseIdentifier, for: indexPath | ||
withReuseIdentifier: UpcomingPromiseCollectionViewCell.reuseIdentifier, | ||
for: indexPath | ||
) as? UpcomingPromiseCollectionViewCell else { return UICollectionViewCell() } | ||
cell.dataBind(viewModel.upcomingPromiseData.value[indexPath.item]) | ||
return cell | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,13 +52,16 @@ class JoinButtonView: BaseView { | |
} | ||
|
||
func setJoinButtonViewStatus(isReceived: Bool) { | ||
if isReceived { | ||
subTitleLabel.setText("초대 코드를 받았다면", style: .caption02, color: .gray5) | ||
mainTitleLabel.setText("초대 코드 입력하기", style: .body03, color: .gray8) | ||
} | ||
else { | ||
subTitleLabel.setText("초대 코드가 없다면", style: .caption02, color: .gray5) | ||
mainTitleLabel.setText("직접 모임 추가하기", style: .body03, color: .gray8) | ||
} | ||
subTitleLabel.setText( | ||
isReceived ? "초대 코드를 받았다면" : "초대 코드가 없다면", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 생각보다 엄청 간단하게 삼항연산자를 구현할 수 있었네요 ,,, 감사합니다! |
||
style: .caption02, | ||
color: .gray5 | ||
) | ||
|
||
mainTitleLabel.setText( | ||
isReceived ? "초대 코드 입력하기" : "직접 모임 추가하기", | ||
style: .body03, | ||
color: .gray8 | ||
) | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// | ||
// CreateMeetingService.swift | ||
// KkuMulKum | ||
// | ||
// Created by YOUJIM on 7/13/24. | ||
// | ||
|
||
import Foundation | ||
|
||
protocol CreateMeetingServiceType { | ||
|
||
} | ||
|
||
final class CreateMeetingService: CreateMeetingServiceType { | ||
|
||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
갱!