일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Human interface guide
- Xcode
- HIG
- clean architecture
- 리팩토링
- collectionview
- ribs
- 스위프트
- UICollectionView
- swiftUI
- UITextView
- ios
- 클린 코드
- swift documentation
- Protocol
- 애니메이션
- rxswift
- Observable
- uiscrollview
- Refactoring
- SWIFT
- combine
- uitableview
- 리펙터링
- tableView
- RxCocoa
- MVVM
- 리펙토링
- map
- Clean Code
- Today
- Total
목록URL (4)
김종권의 iOS 앱 개발 알아가기
URL과 URI 구분 URI(Uniform Resource Identifier): 특정 리소스 식별자 URL(Uniform Resource Location): 특정 리소스 위치 URI의 방법중 하나가 URL URL의 구조 scheme: 사용할 프로토콜 host: 접근할 서버의 호스트 이름 path: 접근할 서버의 경로에 대한 정보 query: 접근할 대상에 전달하는 추가적인 정보 (= 파라미터) Swift에서 URL 접근 let urlString = "https://ios-development.tistory.com/ios?page=1&item=2" guard let url = URL(string: urlString) else { return } // url의 기본 요소 접근 url.absoluteStri..
addingPercentEncoding 개념 일반적인 인코딩을 시도할 때 내부적으로 지정된 Set을 참고하여 인코딩하지만, Set에 없는 문자 (한글, 띄어쓰기)와 같은 것들을 %인코딩된 문자로 인코딩 시도 String to URL 인코딩 시, 한글이 있어서 nil리턴 let someURLString = "https://ios-development.tistory.com/search?keyword=최신기술" let url = URL(string: someURLString) print(url) // nil 인코딩할때 애플에서 정의한 Set 종류 CharacterSet에 정의된 문자들은 encoding되는게 아닌 키워드로 인식하라는 의미 urlQueryAllowed ! $ & \ ( ) * + - . / : ..
URI vs URL 개념 URI(Uniform Resource Identifier): 특정 리소스 식별자 URL(Uniform Resource Location): 특정 리소스 위치 URI 방법 중 하나가 URL 위 그림에서 1번은 특정 리소스의 식별자 자체를 의미하므로 URI, 2번은 파일의 위치를 가리키므로 URL swift에서 URL을 사용하는 예 이때 리소스가 HTML인 경우 - URLSession let defaultSession = URLSession(configuration: .default) guard let url = URL(string: "\(resource)") else { print("URL is nil") return } // Request let request = URLReques..
URL에 parameter 삽입 (query string) "https://domainABC" 를 "https://domainABC?memberID=1234"로 변경 let url = "https://domainABC" var components = URLComponents(string: url) let id = URLQueryItem(name: "memberID", value: "1234") components?.queryItems = [id] guard let newURL = components?.url else { return } print(newURL) // Optional(https://domainABC?memberID=1234) URL의 parameter 파싱 (query string) "ht..