MacOS-App: Basic Overview > Part-2

1. Story Board – Basic

1) Application Scene

• This is the root level Scene that manages the entire life cycle of the app. This Scene handles important events such as app startup, shutdown, and focus changes.

앱의 전체적인 생명 주기를 관리하는 루트 레벨의 Scene 입니다.
이 Scene 은 앱의 시작, 종료, 포커스 변화 등의 중요한 이벤트를 처리하는 역할을 합니다.

• It is the first thing loaded when the app starts.

앱이 시작될 때 가장 먼저 로드됩니다.

• …

“AppDelegate”와 긴밀히 연결되어 있습니다.

• Components

구성요소

➢ Application
>> This is the main entry point of the app.

>> 앱의 메인 엔트리 포인트 입니다.

➢ App Delegate
>> Performs life cycle management tasks for the app (connected to “AppDelegate.swift”).

>> 앱의 생명 주기 관리 역항을 수행합니다.(“AppDelegate.swift”와 연결 됨)

➢ First Responder
>> It is connected to the event handling system of MacOS and is the object that first receives user input (keyboard, mouse, etc.). If you connect an action here, the object that currently has focus will handle the event.

>> MacOS의 이벤트 처리 시스템과 연결되어 있으며, 사용자의 입력(키보드, 마우스 등)을 가장 먼저 받는 객체 입니다.
이 곳에 액션을 연결하면 해당 이벤트를 현재 포커스를 가진 객체가 처리하게 됩니다.

➢ Menu Bar
>> This is the top menu bar of a MacOS app. By default, there are menu items such as “App”, “File”, and “Edit”, and you can add custom menus here.

>> MacOS 앱의 상단 메뉴바 입니다.
기본적으로 “App”, “File”, “Edit”와 같은 메뉴 항목이 있으며, 여기에 사용자 정의 메뉴를 추가할 수 있습니다.

2) Window Controller Scene

• A controller that manages a single window. In MacOS, since an app can have multiple windows, there is a “Window Controller” for each window.

하나의 윈도우를 관리하는 컨트롤러 입니다.
MacOS에서는 앱이 여러 개의 윈도우를 가질 수 있기 때문에, 각 윈도우마다 “Window Controller”가 존재합니다.

• Manages the creation and display of windows.

윈도우의 생성 및 표시를 관리합니다.

• You display the UI through a “View Controller” and can also create multiple additional windows.

“View Controller”를 통해 UI를 표시하며, 여러 윈도우를 추가로 생성할 수도 있습니다.

• Components

구성요소

➢ Window Controller
>> It inherits the “NSWindowController” class and creates and manages a window. It controls the title, size, state, etc. of the window.

>> “NSWindowController” 클래스를 상속하며, 하나의 윈도우를 생성하고 관리합니다.
윈도우의 타이틀, 크기, 상태 등을 제어합니다.

➢ Window
>> This is the window that is actually visible to the user. It contains a “View Controller” that displays the UI.

>> 실제로 사용자에게 보이는 윈도우 입니다.
이 안에 “View Controller”가 포함되어 UI가 표시됩니다.

➢ Content View Controller (connected “View Controller”)
>> It manages the content area of ​​the window, and UI elements are placed in this “View Controller”.

>> Window의 컨텐츠 영역을 관리하며, UI 요소들이 이 “View Controller”에 배치됩니다.

3) View Controller Scene

• Manages UI elements (Views) that are actually displayed to the user within a window. Places UI components such as buttons, labels, images, and tables, and controls their behavior.

윈도우 안에서 실제로 사용자에게 표시되는 UI요소(View)를 관리합니다.
버튼, 레이블, 이미지, 테이블 등의 UI 구성요소를 배치하고, 그 동작을 제어합니다.

• It handles the logic for user interactions (clicks, inputs, etc.).

사용자의 상호작용(클릭, 입력 등)에 대한 로직을 담당합니다.

• You can use multiple “View Controllers” to implement screen transitions, modal windows, etc.

여러개의 “View Controller”를 사용하여 화면 전환, 모달 창 등을 구현할 수 있습니다.

• Components

구성요소

➢ View Controller
>> It inherits the “NSViewController” class and manages UI elements and logic. (Connected to “ViewController.swift”)

>> “NSViewController” 클래스를 상속하며, UI 요소들과 로직을 관리합니다.(“ViewController.swift” 와 연결됨)

➢ View
>> This is the content area of ​​the “View Controller”. This is where you add UI components such as buttons, text fields, and tables.

>> “View Controller”의 컨텐츠 영역입니다.
이 곳에 버튼, 텍스트 필드, 테이블 등의 UI 컴포넌트를 추가합니다.

2. Story Board – Flow

[Application Scene]
        ↓
[Window Controller Scene]
        ↓
[View Controller Scene]

Leave a Reply