-
Notifications
You must be signed in to change notification settings - Fork 0
Chore/#147 앱 아이콘 및 로띠 추가 #148
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
Merged
The head ref may contain hidden characters: "chore/#147-\uC571-\uC544\uC774\uCF58"
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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 hidden or 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
11 changes: 10 additions & 1 deletion
11
...rish-iOS/Cherrish-iOS.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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
36 changes: 36 additions & 0 deletions
36
Cherrish-iOS/Cherrish-iOS/Presentation/Global/Extension/Lottie+.swift
This file contains hidden or 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,36 @@ | ||
| // | ||
| // Lottie+.swift | ||
| // Cherrish-iOS | ||
| // | ||
| // Created by 이나연 on 1/21/26. | ||
| // | ||
|
|
||
| import SwiftUI | ||
| import Lottie | ||
|
|
||
| struct LottieView: UIViewRepresentable { | ||
| let animationName: String | ||
| let loopMode: LottieLoopMode | ||
|
|
||
| func makeUIView(context: Context) -> UIView { | ||
| let view = UIView(frame: .zero) | ||
|
|
||
| let animationView = LottieAnimationView(name: animationName) | ||
| animationView.loopMode = loopMode | ||
| animationView.play() | ||
|
|
||
| animationView.translatesAutoresizingMaskIntoConstraints = false | ||
| view.addSubview(animationView) | ||
|
|
||
| NSLayoutConstraint.activate([ | ||
| animationView.leadingAnchor.constraint(equalTo: view.leadingAnchor), | ||
| animationView.trailingAnchor.constraint(equalTo: view.trailingAnchor), | ||
| animationView.topAnchor.constraint(equalTo: view.topAnchor), | ||
| animationView.bottomAnchor.constraint(equalTo: view.bottomAnchor) | ||
| ]) | ||
|
|
||
| return view | ||
| } | ||
|
|
||
| func updateUIView(_ uiView: UIView, context: Context) {} | ||
| } | ||
Binary file added
BIN
+7.8 KB
Cherrish-iOS/Cherrish-iOS/Resources/Assets.xcassets/AppIcon.appiconset/100.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+974 KB
Cherrish-iOS/Cherrish-iOS/Resources/Assets.xcassets/AppIcon.appiconset/1024.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.45 KB
Cherrish-iOS/Cherrish-iOS/Resources/Assets.xcassets/AppIcon.appiconset/114.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+10.3 KB
Cherrish-iOS/Cherrish-iOS/Resources/Assets.xcassets/AppIcon.appiconset/120.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+14.3 KB
Cherrish-iOS/Cherrish-iOS/Resources/Assets.xcassets/AppIcon.appiconset/144.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+15.9 KB
Cherrish-iOS/Cherrish-iOS/Resources/Assets.xcassets/AppIcon.appiconset/152.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+18.9 KB
Cherrish-iOS/Cherrish-iOS/Resources/Assets.xcassets/AppIcon.appiconset/167.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+22.2 KB
Cherrish-iOS/Cherrish-iOS/Resources/Assets.xcassets/AppIcon.appiconset/180.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+864 Bytes
Cherrish-iOS/Cherrish-iOS/Resources/Assets.xcassets/AppIcon.appiconset/20.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.4 KB
Cherrish-iOS/Cherrish-iOS/Resources/Assets.xcassets/AppIcon.appiconset/29.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.17 KB
Cherrish-iOS/Cherrish-iOS/Resources/Assets.xcassets/AppIcon.appiconset/40.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.88 KB
Cherrish-iOS/Cherrish-iOS/Resources/Assets.xcassets/AppIcon.appiconset/50.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.42 KB
Cherrish-iOS/Cherrish-iOS/Resources/Assets.xcassets/AppIcon.appiconset/57.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.42 KB
Cherrish-iOS/Cherrish-iOS/Resources/Assets.xcassets/AppIcon.appiconset/58.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.63 KB
Cherrish-iOS/Cherrish-iOS/Resources/Assets.xcassets/AppIcon.appiconset/60.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.66 KB
Cherrish-iOS/Cherrish-iOS/Resources/Assets.xcassets/AppIcon.appiconset/72.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.15 KB
Cherrish-iOS/Cherrish-iOS/Resources/Assets.xcassets/AppIcon.appiconset/76.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.52 KB
Cherrish-iOS/Cherrish-iOS/Resources/Assets.xcassets/AppIcon.appiconset/80.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.31 KB
Cherrish-iOS/Cherrish-iOS/Resources/Assets.xcassets/AppIcon.appiconset/87.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
166 changes: 143 additions & 23 deletions
166
Cherrish-iOS/Cherrish-iOS/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json
This file contains hidden or 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
Binary file removed
BIN
-729 KB
...sh-iOS/Cherrish-iOS/Resources/Assets.xcassets/AppIcon.appiconset/app icon 1.png
Binary file not shown.
Binary file removed
BIN
-729 KB
...sh-iOS/Cherrish-iOS/Resources/Assets.xcassets/AppIcon.appiconset/app icon 2.png
Binary file not shown.
Binary file removed
BIN
-729 KB
...rish-iOS/Cherrish-iOS/Resources/Assets.xcassets/AppIcon.appiconset/app icon.png
Binary file not shown.
Large diffs are not rendered by default.
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.
🧩 Analysis chain
🏁 Script executed:
Repository: TEAM-Cherrish/Cherrish-iOS
Length of output: 141
🏁 Script executed:
fd "Lottie\+\.swift" -type fRepository: TEAM-Cherrish/Cherrish-iOS
Length of output: 240
🏁 Script executed:
cat -n "./Cherrish-iOS/Cherrish-iOS/Presentation/Global/Extension/Lottie+.swift"Repository: TEAM-Cherrish/Cherrish-iOS
Length of output: 1331
🌐 Web query:
UIViewRepresentable updateUIView lifecycle SwiftUI best practices💡 Result:
Key points & best practices for UIViewRepresentable lifecycle (makeUIView / updateUIView)
@Binding/@ObservedObjecton the SwiftUI side and propagate changes in updateUIView or via the coordinator. (ios-swift-explorations.hashnode.dev)Short checklist when implementing:
If you want, I can show a compact example demonstrating these patterns.
Citations:
updateUIView가 비어 있어 애니메이션 속성 변경이 반영되지 않음
animationName 또는 loopMode가 변경되어도 updateUIView가 구현되지 않았으므로 UI에 반영되지 않습니다. 특히 동일한 LottieView를 다른 파라미터로 재사용할 때 버그가 발생할 수 있습니다.
Coordinator 패턴을 사용하여 animationView 참조를 유지한 후, updateUIView에서 애니메이션과 루프 모드를 갱신해야 합니다.
🛠️ 제안 수정
struct LottieView: UIViewRepresentable { let animationName: String let loopMode: LottieLoopMode + func makeCoordinator() -> Coordinator { Coordinator() } + func makeUIView(context: Context) -> UIView { let view = UIView(frame: .zero) let animationView = LottieAnimationView(name: animationName) + context.coordinator.animationView = animationView animationView.loopMode = loopMode animationView.play() animationView.translatesAutoresizingMaskIntoConstraints = false view.addSubview(animationView) NSLayoutConstraint.activate([ animationView.leadingAnchor.constraint(equalTo: view.leadingAnchor), animationView.trailingAnchor.constraint(equalTo: view.trailingAnchor), animationView.topAnchor.constraint(equalTo: view.topAnchor), animationView.bottomAnchor.constraint(equalTo: view.bottomAnchor) ]) return view } - func updateUIView(_ uiView: UIView, context: Context) {} + func updateUIView(_ uiView: UIView, context: Context) { + guard let animationView = context.coordinator.animationView else { return } + if animationView.animation?.name != animationName { + animationView.animation = LottieAnimation.named(animationName) + } + animationView.loopMode = loopMode + animationView.play() + } + + final class Coordinator { + var animationView: LottieAnimationView? + } }🤖 Prompt for AI Agents