일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- combine
- 리펙토링
- 애니메이션
- UITextView
- 리팩토링
- 스위프트
- HIG
- Refactoring
- uiscrollview
- UICollectionView
- swift documentation
- Observable
- SWIFT
- Human interface guide
- Protocol
- ios
- collectionview
- 클린 코드
- tableView
- Clean Code
- swiftUI
- uitableview
- 리펙터링
- Xcode
- clean architecture
- ribs
- RxCocoa
- map
- MVVM
- rxswift
- Today
- Total
목록분류 전체보기 (1644)
김종권의 iOS 앱 개발 알아가기

Hit Testing이란? 터치 이벤트가 발생한 최상단 뷰를 찾는 행위 -> 찾는 이유: First Responsder (해당 이벤트를 처리할 수 있는 첫 번째 뷰를 탐색하는 것) Hit Testing 동작 원리 최상단 뷰 탐색(역순 탐색): 상식적으로 사용자가 탭한건 가장 위에 얹어진 뷰라고 생각할 수 있지만, Hit Testing은 가장 밑에 깔린것부터 탐색 현재 MainView위에 Subview1, Subview2가 sibling을 이루고 있다면, 아래와같이 탐색 UIWindow -> MainView -> Subview2 -> Subview1 UIWindow -> hitTest(_:with:) 호출 -> 내부적으로 point(inside:with:) 호출 // point(inside:with)로 현..

Xcode에서 현재 gpx파일 추가 - gpx란? gps example format 시간과 좌표를 명시해주면 시간에 따라서 해당 좌표로 이동 - 4곳의 좌표를 시간차이를 두고 생성해놓으면 시계방향 또는 반시계방향으로 돌게끔 할 수 있음 .gpx파일 -- wpt가 한 좌표 세트 12.39 -- 고도 2021-02-04T06:47:03Z -- 시간 연속적으로 이동하게끔 작성 12.39 2021-02-04T06:47:03Z 12.46 2021-02-04T06:47:22Z 12.33 2021-02-04T06:47:35Z 테스트 방법 실행 후 xcode에서 선택 새로 만든 MyLocation.gpx 클릭 -> MyLocation.gpx에 지정한 좌표로 이동 위 방법이 아닌 다른 방법 Xcode -> Debug -..

FloatingPanel이란? ViewController위에 또다른 ViewController가 떠있으며 올릴 수 있는 형태 사용 방법 FloatingPanel 프레임워크 이용 ViewController 준비: 배경 VC1와 그 위에 띄울 VC2 종속성 pod 'FloatingPanel' fpc(FloatingPanelController) 초기화 class ViewController: { var fpc: FloatingPanelController! var contentsVC: ContentsVC! // 띄울 VC override func viewDidLoad() { super.viewDidLoad() serupView() } private func setupView() { contentsVC = stor..

버튼정렬 default: 버튼 안의 내용이 좌측으로 정렬되어있음 우측정렬방법? -> semantic 속성이용 오른쪽 정렬: Force Right-to-Left

UITextView UITextField는 UI가 한 줄이지만 UITextView는 "TextArea"개념 (넓은 면적) UITextView는 placeholder를 제공하지 않음 placeholder를 구현하려고 하면, 입력 시 한글 자모가 불리되는 현상 발생 STTextView 프레임워크 placeholder가 구현된 프레임워크 의존성 pod 'STTextView' 사용 UITextView 추가 class - STTextView로 설정 placeholder에 입력 (font는 text와 동일한 font를 갖음) cursor 색 설정 - tint color * 참고: github.com/onl1ner/STTextView

Container와 Child 구성 containerVC위에 Sub1 또는 Sub2를 올려지는 화면 containerVC위에 Sub1이 올려가져 있지만 ContainerVC의 버튼도 선택됨 (Sub1의 view를 PassThroughView로 지정한 후 ContainerVC의 child로 구성되었기 때문) Main화면을 중심으로, sub1, sub2, ... 바뀌는 화면 관리 Main이라는 ContainerVC와 sub1VC, sub2VC, ... 들로 관리 Main화면을 계속 띄워놓고 그 위에 sub1VC, sub2VC가 덮어지는 형태이며 main과 sub 둘 다 보여지게 할 때 사용 중요한 공통 로직들을 Main에서 하며, 재사용에 유리함 예시) main에는 지도화면 (main 화면은 항상 밑에 존재..
긴 문자열 파일을 저장하고 싶은 경우 keychain (x) userDefault (x) 긴 문자열을 저장하는데 적합한 FileManager를 이용하여 documentDirectory에 저장 사용 방법 파일이름 정의: 상수 이용 struct Constants { static let sampleFileName = "sampleFile" } save 함수 정의 (String에 extension하여 사용하면 재활용성 상승) func saveFile(stringData: String, fileName: String) { let directory = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0] let sampleFileName..
AppDelgate 테스트용 함수 // testPrint() func testPrint() { print("Test!!") } AppDelegate 참조 class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() if let appDelegate = UIApplication.shared.delegate as? AppDelegate { appDelegate.testPrint() } } }