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

merge :: Kingfisher 적용 #184

Merged
merged 4 commits into from
Mar 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public extension TargetDependency.SPM {
static let Needle = TargetDependency.external(name: "NeedleFoundation")
static let Moya = TargetDependency.external(name: "Moya")
static let CombineMoya = TargetDependency.external(name: "CombineMoya")
static let Kingfisher = TargetDependency.external(name: "Kingfisher")
}

public extension Package {
Expand Down
32 changes: 16 additions & 16 deletions Projects/Features/MyPageFeature/Sources/MyPage/MyPageView.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import BaseFeature
import DesignSystem
import SwiftUI
import Kingfisher

struct MyPageView: View {
@StateObject var viewModel: MyPageViewModel
Expand Down Expand Up @@ -57,22 +58,21 @@ struct MyPageView: View {
Spacer()

ZStack(alignment: .bottomTrailing) {
AsyncImage(url: viewModel.profile?.profileImageURL) { image in
image
.resizable()
.aspectRatio(contentMode: .fill)
.frame(width: 74, height: 74)
.clipShape(Circle())
.scaledToFill()
} placeholder: {
ProgressView()
.progressViewStyle(
CircularProgressViewStyle(tint: .white)
)
.frame(width: 74, height: 74)
.background(Color.GrayScale.gray5)
.clipShape(Circle())
}
KFImage(viewModel.profile?.profileImageURL)
.placeholder { _ in
ProgressView()
.progressViewStyle(
CircularProgressViewStyle(tint: .white)
)
.frame(width: 74, height: 74)
.background(Color.GrayScale.gray5)
.clipShape(Circle())
}
.resizable()
.aspectRatio(contentMode: .fill)
.frame(width: 74, height: 74)
.clipShape(Circle())
.scaledToFill()

Circle()
.fill(Color.GrayScale.gray3)
Expand Down
3 changes: 2 additions & 1 deletion Projects/Modules/FeatureThirdPartyLib/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ let project = Project.makeModule(
name: "FeatureThirdPartyLib",
product: .framework,
dependencies: [
.SPM.Needle
.SPM.Needle,
.SPM.Kingfisher
]
)
3 changes: 2 additions & 1 deletion Tuist/Dependencies.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ let dependencies = Dependencies(
.remote(url: "https://github.com/Quick/Quick.git", requirement: .upToNextMajor(from: "5.0.1")),
.remote(url: "https://github.com/Quick/Nimble.git", requirement: .upToNextMajor(from: "10.0.0")),
.remote(url: "https://github.com/uber/needle.git", requirement: .upToNextMajor(from: "0.19.0")),
.remote(url: "https://github.com/team-aliens/Moya.git", requirement: .branch("master"))
.remote(url: "https://github.com/team-aliens/Moya.git", requirement: .branch("master")),
.remote(url: "https://github.com/onevcat/Kingfisher.git", requirement: .upToNextMajor(from: "7.0"))
],
baseSettings: .settings(
configurations: [
Expand Down