하이 D:)veloper

  • 홈
  • 태그
  • 방명록

@UIApplicationMain 1

[iOS] 앱의 시작지점 @main

프로젝트를 하나 생성하는 순간 우리는 @main이라는 것을 찾아볼 수 있다. 기본적으로 생성되어 있는 UIResponder와 UIApplicationDelegate를 상속한 AppDelegate라는 클래스 위에 @main이라는 키워드가 붙어 있는 것을 볼 수 있다. (SwiftUI에서는 App을 상속받은 구조체 위에 @main이라는 키워드가 붙어 있다) 그렇담, @main이라는 것이 무엇이며 어떤 역할을 하는지 천천히 알아보자 iOS 애플리케이션의 Entry Point Entry Point란 프로그램이 시작하는 지점, 즉, 진입점을 뜻하는데 Swift 컴파일러는 class나 struct에 명시된 @main이라는 annotation을 통해 전역범위에 있는 코드를 자동으로 인식하게 되고 프로젝트 내부에 숨겨..

iOS 2024.02.11
이전
1
다음
더보기
프로필사진

하이 D:)veloper

최근글과 인기글

  • 최근글
  • 인기글

Calendar

«   2026/05   »
일 월 화 수 목 금 토
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
  • 분류 전체보기 (67)
    • SwiftUI (19)
    • Swift (32)
    • iOS (11)
    • RxSwift (3)

Tag

completionHandler, Equatable, swiftUI, coredata, xcode, existentialContainer, Generic, coldobservable, lokalise, existentialtype, UIKit, struct, swift localization, ios, hotobservable, Protocol, notification, GCD, RxSwift, Swift,

Copyright © AXZ Corp. All rights reserved.

티스토리툴바