iOS/Swift


openSettingsURLString | Apple Developer DocumentationThe URL string you use to deep link to your app’s custom settings in the Settings app.developer.apple.comif let url = URL(string: UIApplication.openSettingsURLString){ UIApplication.shared.open(url)} 응용[앱 이름]>[알림]에서\n알림을 허용해" data-og-host="dev-geeyong.tistory.com" data-og-source-url="https://dev-geeyong.tistory.com/74" data-og-url="https://..


WKUIDelegate(Protocol) : 웹페이지를 대신하여 기본 UI 요소를 표시하는 방법 새 창이 열리는 것을 제어 사용자가 요소를 클릭했을 때 표시되는 기본 메뉴 Item의 동작을 강화 기타 UI 관련 작업 수행 JavaScript 또는 기타 플러그인 콘텐츠를 처리하는 결과로 호출 WKUIDelegate | Apple Developer Documentation The methods for presenting native user interface elements on behalf of a webpage. developer.apple.com webView(_:createWebViewWith:for:windowFeatures:) 새로운 웹뷰를 생성 webView(_:createWebViewWith:..


WKNavigationDelgate 웹뷰의 탐색(navigation) 변경사항을 수락 또는 거부하고 탐색 요청 진행 상황을 추적하는 방법 WKNavigationDelegate | Apple Developer Documentation Methods for accepting or rejecting navigation changes, and for tracking the progress of navigation requests. developer.apple.com webView(_:decidePolicyFor:preferences:decisionHandler:) 웹 페이지의 탐색 허용 여부를 결정할 때 webView(_:decidePolicyFor:preferences:decisionHandler:) | Ap..


Calendar(struct) 달력 단위와 절대 시점간의 관계를 정의하고, 날짜 계산 및 비교 기능 제공 import Foundation // 달력 선택 let buddhistCalendar = Calendar(identifier: .buddhist) let now = Date() // 사용자의 현재 달력 let calendar = Calendar.current // 날짜 요소에 접근하기 let year = calendar.component(.year, from: now) // 년(Int) let month = calendar.component(.month, from: now) // 월(Int) let day = calendar.component(.day, from: now) // 일(Int) let w..


viewIsAppearing(_:) 시스템이 ViewController의 view를 view 계층구조에 추가하고 있다는 것을 ViewController에 알림 호출 이후에 ViewController의 view가 나타날 때마다 System은 이 함수를 한 번씩 호출합니다. viewWillAppear(_:)와 달리 System은 ViewController의 view를 view계층 구조에 추가하고 이 함수를 호출하고 Superview는 ViewController의 view를 배치합니다. viewWillAppear vs viewIsAppearing System은 모양을 전환하는 중에 viewIsAppearing(_:)을 한 번만 호출하고 view가 나타날 때 Layout이 필요하지 않은 경우에도 호출합니다.