-
Notifications
You must be signed in to change notification settings - Fork 0
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
[ITDS-71] feature: Skeleton 개선 및 적용 #62
Open
Hansangjin98
wants to merge
6
commits into
develop
Choose a base branch
from
ITDS-71/feature/skeleton
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
f8fa586
[ITDS-71] feature: #53 - SkeletonView 구현, 스켈레톤 관련 UIView Extension 추가
Hansangjin98 d4d83c8
[ITDS-71] feature: #53 - 기존 HomeSkeleton 제거, 홈 내부 CollectionView 스켈레톤 구현
Hansangjin98 4964dd2
[ITDS-71] feature: #53 - 홈 내부 CollectionView에서 스켈레톤 셀 적용
Hansangjin98 6f4d257
[ITDS-71] feature: #53 - HomeViewController 레이아웃 일부 조정, 스켈레톤 적용
Hansangjin98 5168278
[ITDS-71] feature: #53 - 공고 리스트 화면에 스켈레톤 적용
Hansangjin98 614b336
[ITDS-71] feature: #53 - 공고 상세 화면에 스켈레톤 적용
Hansangjin98 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
35 changes: 35 additions & 0 deletions
35
Targets/DesignSystem/Sources/Component/Home/BannerSkeletonCell.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,35 @@ | ||
// | ||
// BannerSkeletonCell.swift | ||
// DesignSystem | ||
// | ||
// Created by 한상진 on 1/5/25. | ||
// Copyright © 2025 MOZIP. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
|
||
import PinLayout | ||
|
||
public final class BannerSkeletonCell: UICollectionViewCell { | ||
|
||
// MARK: - Properties | ||
private let bannerSkeletonView = SkeletonView() | ||
|
||
// MARK: - Initializer | ||
public override init(frame: CGRect) { | ||
super.init(frame: frame) | ||
|
||
contentView.addSubview(bannerSkeletonView) | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
fatalError("init(coder:) has not been implemented") | ||
} | ||
|
||
// MARK: - Drawing Cycle | ||
public override func layoutSubviews() { | ||
super.layoutSubviews() | ||
|
||
bannerSkeletonView.pin.all() | ||
} | ||
} |
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
98 changes: 0 additions & 98 deletions
98
Targets/DesignSystem/Sources/Component/Home/HomeSkeleton.swift
This file was deleted.
Oops, something went wrong.
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
59 changes: 59 additions & 0 deletions
59
Targets/DesignSystem/Sources/Component/Home/PostSkeletonCell.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,59 @@ | ||
// | ||
// PostSkeletonCell.swift | ||
// DesignSystem | ||
// | ||
// Created by 한상진 on 1/9/25. | ||
// Copyright © 2025 MOZIP. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
|
||
import FlexLayout | ||
import PinLayout | ||
|
||
public final class PostSkeletonCell: UICollectionViewCell { | ||
|
||
// MARK: - Properties | ||
private enum Metric { | ||
static let verticalSpacing: CGFloat = 8 | ||
static let labelHeight: CGFloat = 16 | ||
static let remainDayHeight: CGFloat = 24 | ||
} | ||
|
||
private let thumbnailImageSkeletonView = SkeletonView() | ||
private let titleLabelSkeletonView1 = SkeletonView() | ||
private let titleLabelSkeletonView2 = SkeletonView() | ||
private let remainDayTagSkeletonView = SkeletonView() | ||
|
||
// MARK: - Initializer | ||
public override init(frame: CGRect) { | ||
super.init(frame: frame) | ||
|
||
setupViews() | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
fatalError("init(coder:) has not been implemented") | ||
} | ||
|
||
// MARK: - Drawing Cycle | ||
public override func layoutSubviews() { | ||
super.layoutSubviews() | ||
|
||
contentView.flex.layout() | ||
} | ||
} | ||
|
||
// MARK: - Private Extenion | ||
private extension PostSkeletonCell { | ||
func setupViews() { | ||
contentView.flex | ||
.gap(Metric.verticalSpacing) | ||
.define { | ||
$0.addItem(thumbnailImageSkeletonView).width(100%).aspectRatio(1) | ||
$0.addItem(titleLabelSkeletonView1).height(Metric.labelHeight) | ||
$0.addItem(titleLabelSkeletonView2).height(Metric.labelHeight) | ||
$0.addItem(remainDayTagSkeletonView).width(30%).height(Metric.remainDayHeight) | ||
} | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
스켈레톤 표출 조건 분기처리가 모든 곳에 들어가서 작업량이 많았을 텐데 고생하셨습니다 👍