matchedGeometryEffect(Hero animation)
ยท
๐ŸŽ iOS/SwiftUI
matchedGeometryEffect์‹๋ณ„์ž์™€ ๋„ค์ž„์ŠคํŽ˜์ด์Šค๋ฅผ ์ œ๊ณตํ•˜์—ฌ ๊ธฐํ•˜ํ•™์ด ๋™๊ธฐํ™”๋œ ๋ทฐ ๊ทธ๋ฃน์„ ์ •์˜. ์ด modifier๋ฅผ ์—ฌ๋Ÿฌ ๋ทฐ์— ๋ถ€์ฐฉํ•˜๋ฉด SwiftUI๊ฐ€ ๋ทฐ ๊ฐ„์˜ ์—ฐ๊ฒฐ์„ ์ดํ•ดํ•˜๊ณ , ์ž๋™์œผ๋กœ Transition์„ ์ ์šฉํ•  ์ˆ˜ ์žˆ๊ฒŒ ๋œ๋‹ค. 1. ๊ธฐ๋ณธ ๊ตฌ์กฐ์„ค์ •@Namespace var animation SwiftUI์—์„œ Hero ์• ๋‹ˆ๋ฉ”์ด์…˜์„ ๊ตฌํ˜„ํ•˜๊ธฐ ์œ„ํ•ด ๋จผ์ € ๋„ค์ž„์ŠคํŽ˜์ด์Šค๋ฅผ ์ •์˜ํ•œ๋‹ค.2. ๋ทฐ์— modifier ๋ถ™์ด๊ธฐVStack { if shouldAnimate { Rectangle () .matchedGeometryEffect(id: "shape" , in: animation) } else { Rectangle () .matc..
matchedGeometryEffect
ยท
๐ŸŽ iOS/SwiftUI
matchedGeometryEffect์‹๋ณ„์ž์™€ ๋„ค์ž„์ŠคํŽ˜์ด์Šค๋ฅผ ์ œ๊ณตํ•˜์—ฌ ๊ธฐํ•˜ํ•™์ด ๋™๊ธฐํ™”๋œ ๋ทฐ ๊ทธ๋ฃน์„ ์ •์˜. ์ด modifier๋ฅผ ์—ฌ๋Ÿฌ ๋ทฐ์— ๋ถ€์ฐฉํ•˜๋ฉด SwiftUI๊ฐ€ ๋ทฐ ๊ฐ„์˜ ์—ฐ๊ฒฐ์„ ์ดํ•ดํ•˜๊ณ , ์ž๋™์œผ๋กœ Transition์„ ์ ์šฉํ•  ์ˆ˜ ์žˆ๊ฒŒ ๋œ๋‹ค. 1. ๊ธฐ๋ณธ ๊ตฌ์กฐ์„ค์ •@Namespace var namespace SwiftUI์—์„œ Hero ์• ๋‹ˆ๋ฉ”์ด์…˜์„ ๊ตฌํ˜„ํ•˜๊ธฐ ์œ„ํ•ด ๋จผ์ € ๋„ค์ž„์ŠคํŽ˜์ด์Šค๋ฅผ ์ •์˜ํ•œ๋‹ค.
[SwiftUI] Custom Picker
ยท
๐ŸŽ iOS/SwiftUI
import SwiftUIimport SwiftUIIntrospectenum BirthPickerType { case year case month}struct BirthPickerView: View { let type: BirthPickerType @Binding var selectedNumber: Int let years = Array(1923...2022) let months = Array(1...12) @State private var originOffset: CGFloat = 0 @State private var lastOffset: CGFloat = 0 @State private var currentOffset: CGFloat..
Introspect
ยท
๐ŸŽ iOS/SwiftUI
Introspect SwiftUI์—์„œ UIKit ๋˜๋Š” AppKit ์š”์†Œ๋ฅผ ๊ฐ€์ ธ์˜ฌ ์ˆ˜ ์žˆ๊ฒŒ ํ•ด์ฃผ๋Š” ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ. github https://github.com/siteline/SwiftUI-Introspect GitHub - siteline/swiftui-introspect: Introspect underlying UIKit/AppKit components from SwiftUI Introspect underlying UIKit/AppKit components from SwiftUI - GitHub - siteline/swiftui-introspect: Introspect underlying UIKit/AppKit components from SwiftUI github.com ์‚ฌ์šฉ ์˜ˆ์‹œ ๊ณต์‹ ๋ฌธ์„œ https..
SwiftUI Charts๋กœ ๋ฐฉ์‚ฌํ˜• ์ฐจํŠธ๋งŒ๋“ค๊ธฐ
ยท
๐ŸŽ iOS/SwiftUI
๊ฐœ์š” Radar ์ฐจํŠธ๋ฅผ Charts ํ”„๋ ˆ์ž„์›Œํฌ๋ฅผ ์ด์šฉํ•ด์„œ ๋งŒ๋“ค์–ด ๋ณด๋ คํ•œ๋‹ค. Charts์—์„œ๋Š” ์ฐจํŠธ์˜ ๋ฐ์ดํ„ฐ๋ฅผ ์œ„์ฒ˜๋Ÿผ ๋ฌถ๋Š”๋‹ค. ๋ณธ๋ก  // 1 let greenDataSet = RadarChartDataSet( entries: [ RadarChartDataEntry(value: 210), RadarChartDataEntry(value: 60.0), RadarChartDataEntry(value: 150.0), RadarChartDataEntry(value: 150.0), RadarChartDataEntry(value: 160.0), RadarChartDataEntry(value: 150.0), RadarChartDataEntry(value: 110.0), RadarChartDataEntry(value: 1..
[์•ฑ์Šคํ† ์–ด ๋ฆฌ์ ] Guideline 4.3 - Design - Spam
ยท
๐ŸŽ iOS/SwiftUI
์•ฑ ์ถœ์‹œ๋ฅผ ์œ„ํ•ด ๊ณ ๊ตฐ ๋ถ„ํˆฌํ•˜๊ณ  ์žˆ๋Š”๋ฐ .. ์ด๋Ÿฐ ์‹์œผ๋กœ ๋ฆฌ์ ์ด ์™”๋‹ค. ์•ฑ์Šคํ† ์–ด์— ์ด๋Ÿฐ ์œ ํ˜•์˜ ์•ฑ์ด ์ถฉ๋ถ„ํžˆ ๋งŽ์•„์„œ ์ŠคํŒธ์˜ ํ•œ ํ˜•ํƒœ๋กœ ๊ฐ„์ฃผํ•œ๋‹ค๋Š” ๊ฒƒ์ด๋‹ค. ๋‚ด๊ฐ€ ๋งŒ๋“ค๊ณ  ์žˆ๋Š” ๊ฒƒ์€ ์นœ๊ตฌ๋งŒ๋“ค๊ธฐ ์•ฑ์ธ๋ฐ ๊ธฐ์กด์˜ ์•ฑ๊ณผ ๊ธฐ๋Šฅ์ ์œผ๋กœ ๋น„์Šทํ•œ ๋ถ€๋ถ„์ด ๋งŽ์€ ๋ถ€๋ถ„์ด ์žˆ์—ˆ๋‹ค. ๊ทธ๋ž˜์„œ ์•ฑ์Šคํ† ์–ด์— ์—†๋Š” ๊ธฐ๋Šฅ์„ ์ถ”๊ฐ€ํ•˜๊ณ  ์‹ฌ์‚ฌ ์˜ฌ๋ฆด๋•Œ ์œ ๋‹ˆํฌํ•œ ๋ถ€๋ถ„์„ ์ตœ๋Œ€ํ•œ ์–ดํ•„ํ–ˆ๋”๋‹ˆ 4.3 ์ŠคํŒธ์€ ํ†ต๊ณผํ•  ์ˆ˜ ์žˆ์—ˆ๋‹ค!
[SwiftUI] ์• ๋“œ๋ชน ๋ฐฐ๋„ˆ๊ด‘๊ณ ๋‹ฌ๊ธฐ
ยท
๐ŸŽ iOS/SwiftUI
์„ค์น˜ Info.plist ์ถ”๊ฐ€ GADApplicationIdentifier `[๋‚ด ์• ๋“œ๋ชน ์•ฑ ์•„์ด๋””]` SKAdNetworkItems SKAdNetworkIdentifier cstr6suwn9.skadnetwork SKAdNetworkIdentifier 4fzdc2evr5.skadnetwork SKAdNetworkIdentifier 4pfyvq9l8r.skadnetwork SKAdNetworkIdentifier 2fnua5tdw4.skadnetwork SKAdNetworkIdentifier ydx93a7ass.skadnetwork SKAdNetworkIdentifier 5a6flpkh64.skadnetwork SKAdNetworkIdentifier p78axxw29g.skadnetwork SKAdNetw..
git@my_private_repo.git: An unknown error occurred. reference 'refs/remotes/origin/main' not found (-1) ์˜ค๋ฅ˜ ํ•ด๊ฒฐ
ยท
๐ŸŽ iOS/SwiftUI
๋ฌธ์ œ์ƒํ™ฉ git@my_private_repo.git: An unknown error occurred. reference 'refs/remotes/origin/main' not found (-1) SPM์— ์ƒˆ ํŒจํ‚ค์ง€๋ฅผ ์„ค์น˜ํ•  ๋•Œ ์ด๋Ÿฐ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•œ๋‹ค. ํ•ด๊ฒฐ ์‰˜ ์Šคํฌ๋ฆฝํŠธ๋ฅผ ๋งŒ๋“ค์–ด ํ•ด๊ฒฐํ•œ๋‹ค. vi fix-spm-cache.sh ๋จผ์ € ์ด๋ ‡๊ฒŒ ํŒŒ์ผ์„ ๋งŒ๋“ค์–ด์ฃผ๊ณ  #!/bin/bashif [[ $# -eq 0 ]] ; then echo 'Please call the script with the name of your project as it appears in the derived data directory. Case-insensitive.' echo 'For example: ./fix-spm-cache.sh myp..
[SwiftUI] Custom Selectable Modal
ยท
๐ŸŽ iOS/SwiftUI
์ƒ๊น€์ƒˆ ๊ตฌํ˜„ struct SelectableModal: View { let title: String let selectCases: [String] let onSelect: (String) -> Void var body: some View { VStack(spacing: 0) { Spacer().frame(height: 26) Text(title) .font(.system(size: 17, weight: .bold)) .padding(.bottom, 16) Rectangle() .foregroundColor(ColorManager.black150) .frame(height: 1) ForEach(selectCases, id: \\.self) { selectCase in Button { onSelect(sel..
JerryiOS
'๐ŸŽ iOS/SwiftUI' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๊ธ€ ๋ชฉ๋ก