일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
- Docker Engine
- ubuntu-desktop
- M3
- Swift
- NSURLErrorDomain Code=-1022
- Arm
- swiftui keyboard
- Linux
- SwiftUI
- ubuntu
- M2
- perfomance efficiency
- 성능효율성
- 6pillar
- ssh-remote
- well architected
- swiftm
- service key is not registered error
- codingkey
- aws database
- Alamofire
- m4
- 가상머신
- AppTransportSecurity
- Apple Silicon
- swiftui keyboard dismiss
- M1
- sudo docker
- Alamofire.AFError.session Task Failed(error: Error Domain=NSURLErrorDomain Code=-1022
- api service key error
- Today
- Total
목록iOS (9)
behan의 개인적인 기술 블로그

http 통신을 위해 Alamofire을 사용하려 했는데 Alamofire.AFError.session Task Failed(error: Error Domain=NSURLErrorDomain Code=-1022 이런 에러가 떴다. iOS9 부터는 기본적으로 http호출을 할 수 없다고 한다. Info.plist에서 간단한 설정을 해주면 해결 가능하다. 참고 : http://seorenn.blogspot.com/2015/09/ios-9-os-x-1011.html

swift sort()를 사용한 struct 정렬 방법 [구조체] struct CommonCode { let sgId: String let sgName: String } var commoncodes: [CommonCode] = [...] - sort() v.s sorted() sort()는 적용되는 배열 자체를 정렬 sorted()는 정렬된 배열을 리턴(본 배열은 그대로) 사용법 sortedArray = commoncodes.sorted { lhs, rhs in return lhs.sgId < rhs.sgId } commoncodes.sort { lhs, rhs in return lhs.sgId < rhs.sgId } or sortedArray = commoncodes.sorted { $0.sgId < ..

NavigationLink를 사용하면 destination에 지정된 뷰가 미리 생성된다. 미리생성되는 것을 막기 위해서 LazyView라는 struct를 만들어 감싸 사용한다. View를 parameter로 받기 위해서는 Generic형태로 만들어야 한다. [LazyView] struct LazyView: View { let build: () -> Content init(_ build: @autoclosure @escaping () -> Content) { self.build = build } var body: Content { build() } } 사용할 때는 LazyView(SampleView()) 이런 방식으로 기존 뷰를 LazyView로 감싸서 사용한다. 이렇게하면 미리 destinationVie..