728x90
๋ฐ˜์‘ํ˜•

์ „์ฒด 222

[swift] Alamofire๋ž€? Alamofire ์‚ฌ์šฉ๋ฒ• ๋ฝ€๊ฐœ๊ธฐ

Alamofire : ๋น„๋™๊ธฐ๋กœ ์ˆ˜ํ–‰ํ•˜๋Š” swift๊ธฐ๋ฐ˜์˜ HTTP ๋„คํŠธ์›Œํ‚น ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ (ํ†ต์‹  ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ) ๐Ÿ’ก ์™œ ํ•„์š”ํ•œ๊ฐ€ ? - ์„œ๋ฒ„์™€ ํ†ต์‹ ์„ ํ•˜๊ธฐ ์œ„ํ•ด ! ๋” ๊ตฌ์ฒด์ ์œผ๋ก , ์„œ๋ฒ„์—์„œ jsonํ˜•์‹์˜ ๋ฐ์ดํ„ฐ๋ฅผ ๋ฐ›์•„์˜ค๋ ค๋ฉด HTTP ํ†ต์‹ ์„ ํ•ด์•ผํ•˜๋ฉฐ HTTP ํ†ต์‹  ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์˜ ์ตœ๊ฐ•์ž Alamofire๋ฅผ ์ด์šฉํ•ด๋ณด์ž ! Apple์˜ Foundation ํ”„๋ ˆ์ž„์›Œํฌ์—์„œ ์ œ๊ณตํ•˜๋Š” URL ๋กœ๋”ฉ ์‹œ์Šคํ…œ์„ ๊ธฐ๋ฐ˜์œผ๋กœ ๊ตฌ์ถ•๋˜์–ด์žˆ์Œ URLSession ๋ฐ URLSessionTask ๊ฐ™์€ ํด๋ž˜์Šค๋ฅผ ์‚ฌ์šฉํ•˜๊ธฐ ์‰ฝ๊ฒŒ ๊ตฌํ˜„๋˜์–ด์žˆ์Œ Alamofire๋Š” CocoaPods๋ฅผ ์‚ฌ์šฉํ•ด ์‰ฝ๊ฒŒ ์„ค์น˜ ๊ฐ€๋Šฅ ์‚ฌ์šฉ๋ฒ• Alamofire๋ฅผ ์‚ฌ์šฉํ•˜๊ธฐ ์œ„ํ•ด์„  ์ œ์ผ ๋จผ์ € import Alamofire ํ•ด์คŒ โœฑ ์ฐธ๊ณ  ) Alamofire ver5 ์ดํ›„๋ถ€ํ„ฐ๋Š” AF ๊ฐ€ Se..

[swift] Metal vs OpenGL

Metal vs OpenGL ๐Ÿ“ข ํ˜„์žฌ Apple ์ž…์žฅ : OpenGL deprecate ์‹œํ‚ฌ ๊ฒƒ์ด๋ฏ€๋กœ Metal ์‚ฌ์šฉ ๊ถŒ์žฅ! OpenGL : Open Graphics Libaray ์‹ค๋ฆฌ์ฝ˜ ๊ทธ๋ž˜ํ”ฝ์Šค์‚ฌ์—์„œ ๋งŒ๋“  2์ฐจ์› ๋ฐ 3์ฐจ์› ๊ทธ๋ž˜ํ”ฝ์Šค ํ‘œ์ค€ API 3D ๊ฒŒ์ž„์—์„œ ํ•„์š”ํ•œ ์ž…์ฒด๊ฐ, ํ…์Šค์ณ, ๊ทธ๋ฆผ์ž์˜ ๋ณ€ํ™” ๋“ฑ์„ ํ‘œํ˜„ํ•˜๊ธฐ ์œ„ํ•ด ๋งŽ์€ ์—ฐ์‚ฐ๋“ค์ด ํ•„์š”ํ•˜๋ฉฐ, ์†Œํ”„ํŠธ์›จ์–ด๋งŒ์œผ๋กœ๋Š” ํ•œ๊ณ„๊ฐ€ ์žˆ์Œ. ํ•˜๋“œ์›จ์–ด ๊ฐ€์† ๊ธฐ๋Šฅ ์ด ํ•„์ˆ˜์  ! → ์ด๋Ÿฐ ๋ณต์žกํ•œ ์—ฐ์‚ฐ๊ณผ ํ•˜๋“œ์›จ์–ด ์ œ์–ด๋ฅผ ๋Œ€์‹  ํ•ด์ฃผ๋Š” ๊ฒƒ์ด 3D graphic library๋“ค์ด๊ณ  OpenGL์ด ๊ทธ ์ค‘ ํ•˜๋‚˜ OpenGL ES : OpenGL for Embedded System ๋ชจ๋ฐ”์ผ๊ณผ ๊ฐ™์€ ์ž„๋ฒ ๋””๋“œ ์‹œ์Šคํ…œ์„ ์œ„ํ•œ OpenGL OpenGL์˜ subset Metal ์• ํ”Œ ์ด ๊ฐœ๋ฐœํ•œ ํ”„๋ ˆ..

[์•„์ดํฐ13 ํ•‘ํฌ] iPhone13 ํ•‘ํฌ ํ›„๊ธฐ๐Ÿ’• ์‹ค๋ฌผ๊นกํŒจ โœจ

์ด๋ฒˆ์— ์•„์ดํฐ13 ์ค‘๊ฐ„ ์‚ฌ์ด์ฆˆ ํ•‘ํฌ์ƒ‰์ƒ์„ ๊ตฌ์ž…!! ์‚ฌ์ง„์— ์‹ค๋ฌผ ์ƒ‰๊ฐ์ด ์ž˜ ์•ˆ ๋‹ด๊ฒจ์„œ ์•„์‰ฝ์ง€๋งŒ ์š”๋ฆฌ์กฐ๋ฆฌ ๋‹ด์•„๋ณด๊ฒŒ์”€!! ใ…Žใ…Ž

์ผ์ƒ 2021.12.12

[swift] swiftui Text ์‚ฌ์ด์ฆˆ์— ๋งž์ถฐ์„œ frameํฌ๊ธฐ ์ •ํ•˜๊ธฐ (fixedSize)

์˜ˆ์‹œ : ์•„๋ž˜ ์ฝ”๋“œ๋ฅผ ์‹คํ–‰์‹œํ‚ค๋ฉด struct Title: View { var body: some View { VStack { Text("Statistics") Rectangle() .foregroundColor(.red) .frame(height: (5.0)) } } } ์œ„์™€ ๊ฐ™์ด ๋นจ๊ฐ„์ค„์ด ์ƒ๊ธด๋‹ค. ํ•˜์ง€๋งŒ ๋‚ด๊ฐ€ ์›ํ•˜๋Š” ๊ฑด..!! ์ด๋ ‡๊ฒŒ text ์‚ฌ์ด์ฆˆ์— ๋งž์ถฐ์„œ frameํฌ๊ธฐ๊ฐ€ ์ง€์ •๋˜๊ธธ ๋ฐ”๋ž€๋‹ค. ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์ฝ”๋“œ๋ฅผ ์ˆ˜์ •ํ•˜๋ฉด ๋œ๋‹ค !!!! struct Title: View { var body: some View { VStack { Text("Statistics") Rectangle() .foregroundColor(.red) .frame(height: (5.0)) }.fixedSize() } } ํ•ด๊ฒฐ๋ฐฉ๋ฒ• :..

[htop] htop install ์—๋Ÿฌ 'E: Unable to locate package htop' ํ•ด๊ฒฐ๋ฐฉ๋ฒ• !!

htop install ํ•˜๋ ค๊ณ  ํ• ๋•Œ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์—๋Ÿฌ๋ฉ”์„ธ์ง€๊ฐ€ ๋œจ๋Š” ๊ฒฝ์šฐ ..! user@test:~$ sudo apt-get install htop Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package htop ํ•ด๊ฒฐ๋ฐฉ๋ฒ•์€ ๋งค์šฐ ๊ฐ„๋‹จํ•˜๋‹ค sudo apt-get update ๋ฅผ ํ•ด์ฃผ๊ณ  ๋‹ค์‹œ installํ•˜๋ฉด ๋œ๋‹ค !!! user@test:~$ sudo apt-get update Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB] Get:2 http://archive.ubu..

[python] ํ…์ŠคํŠธ ํŒŒ์ผ ์ž๋ฅด๊ธฐ (text file crop)

#ํŒŒ์ด์ฌ ํ…์ŠคํŠธ ํŒŒ์ผ ๋‚ ๋ฆฌ๊ธฐ #python textfile crop #python textfile delete line ๋‹ค์Œ๊ณผ ๊ฐ™์€ ํ…์ŠคํŠธํŒŒ์ผ์ด ์žˆ๋‹ค๊ณ  ํ•˜์ž ์—ฌ๊ธฐ์„œ ํŠน์ • line ํ˜น์€ ์—ฌ๋Ÿฌ๊ฐœ์˜ line์„ ์ง€์šฐ๊ณ  ์‹ถ๋‹ค๋ฉด..?? ์ ˆ๋ฐ˜์„ ๋‚ ๋ ค๋ฒ„๋ฆฌ๊ณ  ์‹ถ๋‹ค๋ฉด?? line 1 of the text file line 2 of the text file line 3 of the text file line 4 of the text file line 5 of the text file # 1. ํ…์ŠคํŠธ ํŒŒ์ผ ์ฝ์–ด๋“ค์ด๊ธฐ # filename์— ํ…์ŠคํŠธํŒŒ์ผ ๊ฒฝ๋กœ๋ฅผ string์œผ๋กœ ๋„ฃ์–ด์ค€๋‹ค filename = './textfile.txt' text_file = opend(filename).readlines() # 2. ์ง€์šฐ๊ณ  ์‹ถ์€ li..

[Xcode] Compiling failed: extra tokens at the end of #sourceLocation directive ์—๋Ÿฌ ํ•ด๊ฒฐ โ€ผ๏ธ

xcode preview๊ธฐ๋Šฅ์„ ์‚ฌ์šฉํ•˜๋ ค๊ณ  ํ•˜๋ฉด ์ž๊พธ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ–ˆ๋‹ค Compiling failed: extra tokens at the end of #sourceLocation directive ์ด์™€ ๊ฐ™์€ ์—๋Ÿฌ๋Š” xcode ๋ฒ„๊ทธ๋ผ๊ณ  ํ•œ๋‹ค. if ๋ฌธ์ด๋‚˜ ํด๋กœ์ €์™€ ๊ฐ™์ด '{' ๊ด„ํ˜ธ ์—ด๊ธฐ ๋ถ€๋ถ„์— ์ฃผ์„์ด ์žˆ์œผ๋ฉด ๋ฐœ์ƒํ•˜๋Š” ์˜ค๋ฅ˜๋ผ๊ณ  ํ•œ๋‹ค. ์‹ค์ œ๋กœ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•œ ์ง€์ ์œผ๋กœ ๊ฐ€๋ณด๋‹ˆ ๊ด„ํ˜ธ ์—ด๊ธฐ ๋ถ€๋ถ„์— ์ฃผ์„์ด ๋‹ฌ๋ ค์žˆ์—ˆ๋‹ค ์ € ์ฃผ์„์„ ์‚ญ์ œํ•ด์ฃผ๊ณ  ๋‹ค์‹œ ๋นŒ๋“œํ•˜์˜€๋”ฐ ! Build Success !!

[Xcode] Simulator Error ํ•ด๊ฒฐ๋ฐฉ๋ฒ• : ld: in /Users/../.../Pods/FirebaseAnalytics/Frameworks/FIRAnalyticsConnector.framework/FIRAnalyticsConnector(FIRAnalyticsConnector_e321ed8e3db06efc9803f6c008e67a34.o), building for iOS Simulator, but linking in obj..

์ด๋ฒˆ์— ์•„์ด๋งฅ M1์„ ๊ตฌ๋งคํ•˜๊ณ  simulator๋ฅผ ์‚ฌ์šฉํ•  ๋•Œ๋งˆ๋‹ค ์—๋Ÿฌ์™€ ๋งˆ์ฃผํ•˜์—ฌ,, ๊ต‰์žฅํžˆ ๋ถˆํŽธํ–ˆ๋‹ค,,ใ…Ž ๋‚ด๊ฐ€ ๋งˆ์ฃผํ•œ ์—๋Ÿฌ๋Š” ld: in /Users/../.../Pods/FirebaseAnalytics/Frameworks/FIRAnalyticsConnector.framework/FIRAnalyticsConnector(FIRAnalyticsConnector_e321ed8e3db06efc9803f6c008e67a34.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/.../.../Pods/FirebaseAnalytics/Frameworks/FIRAnalyticsConnector.framework/FIR..

[Divoom Ditoo-Plus] ๋””๋ถ ๋””ํˆฌ ํ”Œ๋Ÿฌ์Šค ๋ธ”๋ฃจํˆฌ์Šค ์Šคํ”ผ์ปค ํ›„๊ธฐ ๐Ÿ’—๐ŸŽถ

๊ฑฐ์˜ 1๋…„๊ฐ„ ๊ตฌ๋งคํ•˜๋ ค๊ณ  ์ฐœํ•ด๋‘์—ˆ๋˜ DIVOOM์˜ DITOO-PLUS ๋ธ”๋ฃจํˆฌ์Šค ์Šคํ”ผ์ปค๋ฅผ ๊ตฌ๋งคํ•˜์˜€๋‹ค..!!!!! ์ƒ‰์ƒ์€ 5๊ฐ€์ง€๊ฐ€ ์žˆ๋Š”๋ฐ ์ด๋ฒˆ์— ์‚ฐ iMAC ๊ทธ๋ฆฐ๊ณผ ๋งค์น˜๋ฅผ ์ƒ๊ฐํ•ด์„œ ํฐ์ƒ‰์œผ๋กœ ๊ตฌ๋งคํ–ˆ๋‹น ใ…Žใ…Žใ…Žใ…Ž ํ…๋ฐ”์ดํ…์—์„œ๋Š” 12๋งŒ์›์ •๋„์— ํŒ”๊ณ ์žˆ์—ˆ๊ณ  ํ•ด์™ธ์—์„œ ๊ตฌ๋งคํ•˜๋ฉด ์ซŒ ๋” ์‹ธ๊ฒŒ ์‚ด ์ˆ˜ ์žˆ๋‹น (๋Œ€์‹  ํ•ด์™ธ๋ฐฐ์†ก์ด๋ผ ์ตœ์†Œ 2์ฃผ๋Š” ๊ธฐ๋‹ค๋ ค์•ผ๋œ๋‹น) ์ง !!!! ์ด๋ ‡๊ฒŒ ๊ท€์—ฌ์šด ๋ƒ‰์žฅ๊ณ  ๊ฐ™์ด ์ƒ๊ธด ํ†ต์•ˆ์— ๋“ค์–ด์žˆ์—ˆ๋‹น ํ†ต๋„ ๋„ˆ๋ฌด ๊ท€์—ฌ์›Œ ใ… ใ… ใ… ใ…  ๋ฏผํŠธ์ƒ‰ ์†์žก์ด์™€ ๋ฏผํŠธ์ƒ‰ ํ‚ค๋ณด๋“œ๊ฐ€ ์•„์ด๋งฅ์ด๋ž‘ ์ƒ‰๊น”์ด ์•„์ฃผ ๋”ฑ๋งž๋Š”๋‹น ใ…œใ…œ ๐Ÿ˜๐Ÿ˜ ์˜ค๋ฅธ์ชฝ ๋ฉด์— ๋ณด์ด๋Š” ์ € ๋™๊ทธ๋ž€ ๋ถ€๋ถ„์„ ์‚ดํฌ์‹œ ๋ˆ„๋ฅด๊ณ  ๋ฌธ์„ ์—ด์–ด์ฃผ๋ฉด ๋œ๋‹น! ์˜คํ”ˆ ๋” ๋„์–ด~~ ๋‘๊ทผ๋‘๊ทผ..!! ๊ฝค ๋ฌต์งํ•˜๊ณ  ํฌ๋‹ค ๋ชจ๋‹ˆํ„ฐ ์œ—๋ถ€๋ถ„์— ๋ฏผํŠธ์ƒ‰ ๋ถ€๋ถ„์ด ๋ฐ”๋กœ ์†Œ๋ฆฌ๊ฐ€ ๋‚˜์˜ค๋Š” ์Šคํ”ผ์ปค๋‹น ์ƒ‰๊น” ๋„ˆ๋ฌด ์ด๋ป ใ…œใ…œใ…œ๐Ÿ˜˜ ๋ ˆ๋ฒ„? ์กฐ..

[swift] xcode build ์‹œ "Errors were encountered while preparing your device for development. Please check the Devices and Simulators Window." ์˜ค๋ฅ˜ ํ•ด๊ฒฐ๋ฒ•โ€ผ๏ธ

๊ฐ€๋” xcode์—์„œ ๋””๋ฐ”์ด์Šค ๋ฐ”๊ฟ”์„œ ๋นŒ๋“œํ•˜๋ ค๊ณ  ํ•˜๋‹ค๋ณด๋ฉด ๋งˆ์ฃผํ•˜๊ฒŒ ๋˜๋Š” ์—๋Ÿฌ๋ฉ”์„ธ์ง€... Errors were encountered while preparing your device for development. Please check the Devices and Simulators Window. ์ด์— ๋Œ€ํ•œ ํ•ด๊ฒฐ๋ฐฉ๋ฒ•์€ ์•„์ฃผ ๊ฐ„๋‹จํ•˜๋‹ค!!!!! ๊ป๋‹ค ํ‚ค๋ฉด ๋ผ์š” โ˜บ๏ธ

[swift] UI element ๋ฆฌ์ŠคํŠธ

apple developer ์˜ ๊ณต์‹ ํ™ˆํŽ˜์ด์ง€ ์ฐธ๊ณ ..! https://developer.apple.com/design/human-interface-guidelines/ios/overview/themes/#//apple_ref/doc/uid/TP40006556-CH13-SW1 Themes - iOS - Human Interface Guidelines - Apple Developer iOS Design Themes As an app designer, you have the opportunity to deliver an extraordinary product that rises to the top of the App Store charts. To do so, you'll need to meet high ex..

[swift] uikit์™€ swiftui ํ˜ผ์šฉํ•˜๊ธฐ (uikit์—์„œ swiftui์‚ฌ์šฉ, swiftui์—์„œ uikit์‚ฌ์šฉ)

1. UIKit → SwiftUI : UIKit์˜ UIView๋ฅผ SwiftUI์—์„œ ์‚ฌ์šฉํ•˜๋Š” ๋ฐฉ๋ฒ• ์˜์–ด๋กœ๋Š” wrapping์„ ํ•œ๋‹ค๊ณ  ํ•ฉ๋‹ˆ๋‹ค. wrap UIView to use in SwiftUI 1-a. SwiftUI์—์„œ UIView ์‚ฌ์šฉ UIViewRepresentable protocol๋ฅผ ์ค€์ˆ˜ํ•˜๋Š” ๊ตฌ์กฐ์ฒด(struct) ์ƒ์„ฑํ•˜์—ฌ SwiftUI์—์„œ ์‚ฌ์šฉ UIViewRepresentable protocol : UIViewRespresentable protocol์„ ์ค€์ˆ˜ํ•˜๊ธฐ ์œ„ํ•ด ๋ฐ˜๋“œ์‹œ ๊ตฌํ˜„๋˜์–ด์•ผ ํ•˜๋Š” 2๊ฐ€์ง€ ๋ฉ”์†Œ๋“œ func makeUIView(context: Context) → UIKit์˜ UI ElementType(ex. UILabel) SwiftUI์—์„œ ๋ณด์—ฌ์ค„ view๋ฅผ ๋ฐ˜ํ™˜ func updateUIVi..

[๋”ํ˜„๋Œ€์„œ์šธ ํ˜ธ์šฐ์„ฌ] ์›จ์ดํŒ… ํ•„์ˆ˜ ํ˜ธ์šฐ์„ฌ

์ ์‹ฌ์‹œ๊ฐ„ 11์‹œ 10๋ถ„์ฏค์— ์˜ˆ์•ฝํ•ด์„œ 11์‹œ 30๋ถ„์— ๋จน์œผ๋Ÿฌ ๋“ค์–ด๊ฐˆ ์ˆ˜ ์žˆ์—ˆ๋˜ ํ˜ธ์šฐ์„ฌ.. ์ผ์ฐ ์˜ˆ์•ฝ ์•ˆํ•˜๋ฉด ์ˆœ์‹๊ฐ„์— ๋Œ€๊ธฐํŒ€์ด ๋Š˜์–ด๋‚˜์š”๐Ÿฅบ ๊ทธ๋ ‡๊ฒŒ ์œ ๋ช…ํ•œ ๋ง›์ง‘, ํ˜ธ์šฐ์„ฌ์„ ๋“œ๋””์–ด..!! ๊ฑฐ์˜ ์ข…๋ฅ˜๋ณ„๋กœ ๋‹ค ์‹œ์ผฐ๋‹น ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ 1. ์šฐ์œกํƒ•๋ฉด 2. ๊ฟ”๋ฐ”๋กœ์šฐ 3. ๋ธ”๋ž™ ํ—ˆ๊ฑฐ์šฐ 4. ๋ผ์ง€๊ณ ๊ธฐ ์†ฅ๋ฐฅ

728x90
๋ฐ˜์‘ํ˜•