Skip to content
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

박스오피스II [STEP 2] Diana, gama, Danny #134

Open
wants to merge 30 commits into
base: ic_11_diana
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
b4edcba
feat: BoxOffice에 대한 DTO 모델 구현
forseaest Apr 18, 2024
b887405
refactor: `BoxOffice` 모델 타입의 `BoxOfficeResults` 옵셔널 타입으로 변경, 서버로부터 응답…
dannykim1215 Apr 19, 2024
74d5a0d
feat: 화면 모드 변경 버튼 구현 및 Alert 추가
Diana-yjh Apr 19, 2024
55b929b
feat: 현재 상태에 따라 모드 변경 버튼 텍스트 변경
Diana-yjh Apr 22, 2024
ea75651
feat: 리스트 아이콘 분기처리
Diana-yjh Apr 22, 2024
41aa691
feat: `아이콘` 화면모드로 분기될 때, 보여주는 아이콘 화면 레이아웃 구현
dannykim1215 Apr 22, 2024
14aa3b5
feat: 카카오 api와 네트워킹을 위한 KakaoSearchData 모델 구현
forseaest Apr 22, 2024
ff18688
feat: 카카오 api key 추가
forseaest Apr 22, 2024
68ef6b1
feat: 영화 상세 정보를 보여주는 MovieDetailViewController 화면 구현
forseaest Apr 22, 2024
f16937e
feat: DynamicType 구현
Diana-yjh Apr 23, 2024
438aa79
refactor: Font Constant 값 파일로 분리
Diana-yjh Apr 23, 2024
80d166f
feat: moviePosterImageView의 높이에서 불필요한 여백 제거
forseaest Apr 23, 2024
263c89a
feat: `UserDefaults`를 사용하여 이전에 사용했던 화면모드를 박스오피스 앱 시작할 때 이어서 보여주기 구현
dannykim1215 Apr 23, 2024
2ffe7bc
feat: KakaoSearchData의 DTO 모델 구현
forseaest Apr 23, 2024
144adb9
feat: 카카오 검색 api을 위한 loadKakaoSearchAPI() 함수 구현
forseaest Apr 23, 2024
35a4668
feat: MovieInformation의 DTO 모델 구현
forseaest Apr 24, 2024
9178dd4
feat: list에 다이내믹 타입 적용
Diana-yjh Apr 24, 2024
7213467
refactor: MovieDetailViewController에서 title label들의 width를 가장 긴 label…
forseaest Apr 24, 2024
62d2bc0
feat: `BoxOfficeCell` 타입에서 gridStackView 제거 후, 아이콘 모드 레이아웃 구현
dannykim1215 Apr 25, 2024
f8cb93e
fix: DetailView에서 다이내믹 사이즈에 맞게 title 너비 변경되도록 수정
Diana-yjh Apr 25, 2024
642cb22
refactor: URL 인코딩 에러 방지
forseaest Apr 26, 2024
cc421af
refactor: NetworkService에서 URL 바인딩 코드 분리
forseaest Apr 26, 2024
698a9fb
refactor: NetworkService 싱글톤 적용
forseaest Apr 26, 2024
e9d5545
refactor: 사용하지 않는 스택뷰 삭제
Diana-yjh Apr 26, 2024
b0458bc
feat: 개봉일 표기하는 함수 추가
forseaest Apr 26, 2024
a22b065
Merge branch '2_step2' of https://github.com/Diana-yjh/ios-box-office…
forseaest Apr 26, 2024
c0a4708
refactor: `BoxOfficeCell` 타입 내부의 List 컴포넌트 레이아웃 표현할 때, textAlignment …
dannykim1215 Apr 26, 2024
7f7f66a
feat: KakaoSearchType의 urlString에 분기처리 추가
forseaest Apr 26, 2024
1ac826a
Merge branch '2_step2' of https://github.com/Diana-yjh/ios-box-office…
forseaest Apr 26, 2024
d533601
docs: 리드미 작성
forseaest Apr 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: 아이콘 화면모드로 분기될 때, 보여주는 아이콘 화면 레이아웃 구현
  • Loading branch information
dannykim1215 committed Apr 22, 2024
commit 41aa691cc3accf95cc6e76c9ddd707d2bedba8e3
31 changes: 31 additions & 0 deletions BoxOffice/ViewControllers/BoxOfficeCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,17 @@ class BoxOfficeCell: UICollectionViewListCell {
return stackView
}()

private let gridStackView: UIStackView = {
let stackView = UIStackView()

stackView.translatesAutoresizingMaskIntoConstraints = false
stackView.axis = .vertical
stackView.alignment = .center
stackView.distribution = .equalCentering

return stackView
}()

private let rightStackView: UIStackView = {
let stackView = UIStackView()

Expand Down Expand Up @@ -115,6 +126,8 @@ class BoxOfficeCell: UICollectionViewListCell {
self.rightStackView.addArrangedSubview($0)
}

contentView.layer.borderWidth = 0

NSLayoutConstraint.activate([
contentView.heightAnchor.constraint(equalToConstant: 80),

Expand All @@ -128,6 +141,24 @@ class BoxOfficeCell: UICollectionViewListCell {
])
case .icon:
print("추가해주세요")
[gridStackView].forEach {
self.contentView.addSubview($0)
}

[rankNumberLabel, movieTitleLabel, rankChangeLabel, audienceLabel].forEach {
self.gridStackView.addArrangedSubview($0)
}

contentView.layer.borderWidth = 1

NSLayoutConstraint.activate([
contentView.heightAnchor.constraint(equalToConstant: 80),

gridStackView.topAnchor.constraint(equalTo: contentView.topAnchor, constant: 10),
gridStackView.bottomAnchor.constraint(equalTo: contentView.bottomAnchor, constant: -10),
gridStackView.leadingAnchor.constraint(equalTo: contentView.leadingAnchor),
gridStackView.trailingAnchor.constraint(equalTo: contentView.trailingAnchor)
])
}
}
}
Expand Down
16 changes: 15 additions & 1 deletion BoxOffice/ViewControllers/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,21 @@ class ViewController: UIViewController {
}

private func createCollectionViewIconLayout() -> UICollectionViewCompositionalLayout {
print("추가해주세요")
let itemSize = NSCollectionLayoutSize(widthDimension: .fractionalWidth(0.5), heightDimension: .fractionalWidth(0.5))
let item = NSCollectionLayoutItem(layoutSize: itemSize)


let groupSize = NSCollectionLayoutSize(widthDimension: .fractionalWidth(1.0), heightDimension: .fractionalWidth(0.5))
let group = NSCollectionLayoutGroup.horizontal(layoutSize: groupSize, subitems: [item])
group.interItemSpacing = .fixed(10)

let section = NSCollectionLayoutSection(group: group)
section.interGroupSpacing = CGFloat(10)
section.contentInsets = NSDirectionalEdgeInsets(top: 0, leading: 10, bottom: 0, trailing: 10)

let configuration = UICollectionViewCompositionalLayout(section: section)

return configuration
}

@objc private func selectCalendarDate(sender: AnyObject) {
Expand Down