Skip to content

Commit

Permalink
[Fix] Runnect#134 - 린트에러 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
lee-yeonwoo2 committed May 19, 2023
1 parent 68795d0 commit 9b84e12
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,7 @@ final class CourseDetailVC: UIViewController {
setUI()
setLayout()
setAddTarget()
}

override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
getUploadedCourseDetail()

}
}

Expand Down Expand Up @@ -155,7 +150,6 @@ extension CourseDetailVC {
let deleteVC = RNAlertVC(description: "코스를 정말로 삭제하시겠어요?")
deleteVC.rightButtonTapAction = { [weak self] in
deleteVC.dismiss(animated: false)
self?.navigationController?.popViewController(animated: false)
self?.deleteCourse()
}
deleteVC.modalPresentationStyle = .overFullScreen
Expand Down Expand Up @@ -201,7 +195,7 @@ extension CourseDetailVC {
// MARK: - Method

extension CourseDetailVC {
func setCourseId(courseId: Int, publicCourseId: Int?) {
func setCourseId(courseId: Int?, publicCourseId: Int?) {
self.courseId = courseId
self.publicCourseId = publicCourseId
}
Expand All @@ -210,7 +204,7 @@ extension CourseDetailVC {
self.uploadedCourseDetailModel = model
self.mapImageView.setImage(with: model.publicCourse.image)
self.profileImageView.image = GoalRewardInfoModel.stampNameImageDictionary[model.user.image]
self.profileNameLabel.text = model.user.nickname
self.profileNameLabel.text = model.user.nickname
self.runningLevelLabel.text = "Lv. \(model.user.level)"
self.courseTitleLabel.text = model.publicCourse.title
self.isMyCourse = model.user.isNowUser
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,11 @@ extension CourseStorageVC {
private func setLayout() {
view.addSubviews(naviBar)


naviBar.snp.makeConstraints { make in
make.leading.top.trailing.equalTo(view.safeAreaLayoutGuide)
make.height.equalTo(48)
}


guard UserManager.shared.userType != .visitor else {
self.showSignInRequestEmptyView()
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,10 @@ extension ActivityRecordInfoVC {
@objc func deleteRecordButtonDidTap() {
let deleteAlertVC = RNAlertVC(description: "러닝 기록을 정말로 삭제하시겠어요?")
self.present(deleteAlertVC, animated: false, completion: nil)
deleteAlertVC.modalPresentationStyle = .overFullScreen
deleteAlertVC.rightButtonTapAction = { [weak self] in
deleteAlertVC.dismiss(animated: false)

self?.wantsToDelete()
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,17 +252,6 @@ extension UploadedCourseInfoVC: UICollectionViewDelegateFlowLayout {
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets {
return uploadedCourseInset
}
//<<<<<<< HEAD
//=======

// func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
// let courseDetailVC = CourseDetailVC()
// let courseModel = uploadedCourseList[indexPath.item]
// courseDetailVC.setCourseId(courseId: courseModel.courseId, publicCourseId: courseModel.id)
// courseDetailVC.hidesBottomBarWhenPushed = true
// self.navigationController?.pushViewController(courseDetailVC, animated: true)
// }
//>>>>>>> b3d6309976964fe58bb68432c068d27d31a9f4f5
}

// MARK: - UICollectionViewDataSource
Expand Down Expand Up @@ -299,21 +288,17 @@ extension UploadedCourseInfoVC: UICollectionViewDataSource {
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
guard collectionView.cellForItem(at: indexPath) is CourseListCVC else { return }
guard let selectedCells = collectionView.indexPathsForSelectedItems else { return }
guard let cell = collectionView.cellForItem(at: indexPath) as? CourseListCVC else { return }
let courseList = uploadedCourseList[indexPath.item]
if isEditMode {
self.deleteCourseButton.isEnabled = true
let countSelectCells = selectedCells.count
self.deleteCourseButton.setTitle(title: "삭제하기(\(countSelectCells))")
cell.selectCell(didSelect: true)
} else {
collectionView.deselectItem(at: indexPath, animated: true)
self.deleteCourseButton.setTitle(title: "삭제하기")
self.deleteCourseButton.setEnabled(true)
let courseDetailVC = CourseDetailVC()
courseDetailVC.hidesBottomBarWhenPushed = true
self.navigationController?.pushViewController(courseDetailVC, animated: true)
cell.selectCell(didSelect: false)
}
}
func collectionView(_ collectionView: UICollectionView, didDeselectItemAt indexPath: IndexPath) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ class TermsOfServiceVC: UIViewController {
// Do any additional setup after loading the view.
}


/*
// MARK: - Navigation

Expand Down

0 comments on commit 9b84e12

Please sign in to comment.