본문 바로가기
반응형

Swift66

[iOS] 2단계 초기화 (Two-Phase Initialization) 카테고리 게시글 작성 날짜 게시글 최근 수정 날짜 작성자 iOS 2022.03.03. 01:19 2022.03.03. 01:19 Dev.Yang Swift 언어에서 클래스 (Class) 초기화 과정은 Two-Phase Initialization 과정을 통하여 초기화 작업을 수행합니다. Two-Phase Initialization 초기화 과정은 아래와 같습니다. 첫번째 단계는 클래스 (Class) 내에 Properties들에 대하여 초기 값을 할당하여 초기화 작업을 수행합니다. 두번째 단계는 첫 번째 단계에서 초기 값을 할당 한 Properties에 대한 초기 상태가 결정이 되면 클래스 (Class)에 대한 새로운 인스턴스를 사용하기 전에 저장 된 Properties에 대하여 Customize 초기화 작업.. 2022. 3. 3.
[iOS] Swift 초기화 (Initialization) 초기화 (Initializer)는 클래스 (Class), 구조체 (Struct) 또는 열거형 (Enum)을 사용하기 위한 준비하는 초기 과정입니다. 각각의 저장 속성을 위해 초기화된 값을 설정하는 것과 사용하기 위한 새로운 인스턴스르 준비하기전에 필요한 그외 다른 설정 또는 초기화를 진행 작업을 수행합니다. 또한, Initalizer는 SuperClass와 SubClass 간에 상속이 이루어지며 크게 두 가지의 형태로 상속이 이루어집니다. Designated Initalizer와 Convenience Initalizer 모두 상속하는 경우 자식 클래스 (Child Class)에 Desinated Initalizer가 없는 경우 자식 클래스 (Child Class)에 초기화가 필요한 Properties가 .. 2022. 2. 24.
[HackerRank] Climbing the Leaderboard 카테고리 게시글 작성 날짜 게시글 최근 수정 날짜 작성자 Algorithm 2022.02.17. 23:33 2022.02.17. 23:33 Dev.Yang An arcade game player wants to climb to the top of the leaderboard and track their ranking. The game uses Dense Ranking, so its leaderboard works like this: The player with the highest score is ranked number on the leaderboard. Players who have equal scores receive the same ranking number, and the next player(.. 2022. 2. 17.
[iOS] UIKit, AppKit, SwiftUI 구성 요소 비교 (Difference UIKit, AppKit and SwiftUI Component) 카테고리 게시글 작성 날짜 게시글 최근 수정 날짜 작성자 iOS 2022.02.16. 23:43 2022.02.16. 23:43 Dev.Yang 🛠 뷰 (View) / 컨트롤 (Control) UIKit SwiftUI AppKit UILabel Text NSTextField UITextField TextField NSTextField UITextFiled [SecureText] SecrueField NSSecureTextField UIButton Button NSButton UIImageView Image NSImageView UISwitch Toggle NSSwitch UISlider Slider NSSlider - Circular Slider - Vertical Slider - Horizontal S.. 2022. 2. 16.
반응형