본문 바로가기
iOS 문서

[한글 번역] View Controller Programming Guide for iOS - View Management (2)

by 초가을우엉차 2022. 6. 8.

View Management

 ▶  뷰 관리

 

 

1. The most important role of a view controller is to manage a hierarchy of views.

 ▶  뷰 컨트롤러의 가장 중요한 역할은 뷰의 계층 구조를 관리하는 것입니다.

 

2. Every view controller has a single root view that encloses all of the view controller’s content.

 ▶  모든 뷰 컨트롤러에는 뷰 컨트롤러의 모든 콘텐츠를 포함하는 단일 루트 뷰가 있습니다.

 

3. To that root view, you add the views you need to display your content.

 ▶  해당 루트 뷰에 콘텐츠를 표시하는 데 필요한 뷰를 추가합니다.

 

4. Figure 1-1 illustrates the built-in relationship between the view controller and its views.

 ▶  그림 1-1은 뷰컨트롤러와 뷰간의 기본 제공 관계를 보여줍니다.

 

5. The view controller always has a reference to its root view and each view has strong references to its subviews.

 ▶  뷰 컨트롤러에는 항상 루트 뷰에 대한 참조가 있으며, 각 뷰에는 하위 뷰에 대한 강력한 참조가 있습니다.

 

Figure 1-1 Relationship between a view controller and its views

 ▶  그림 1-1 뷰 컨트롤러와 뷰의 관계

 

NOTE
It is common practice to use outlets to access other views in your view controller’s view hierarchy.
 ▶  뷰컨트롤러의 뷰 계층 구조에 있는 다른 뷰에 액세스하기 위해 아웃렛를 사용하는 것이 일반적입니다.
Because a view controller manages the content of all its views, outlets let you store references to the views that you need.
 ▶  뷰컨트롤러는 모든 뷰의 내용을 관리하기 때문에, 아웃렛을 사용하면 필요한 뷰에 대한 참조를 저장할 수 있습니다.
The outlets themselves are connected to the actual view objects automatically when the views are loaded from the storyboard.
 ▶  스토리보드에서 뷰를 로드할 때, 아웃렛 자체가 실제 뷰 개체에 자동으로 연결됩니다.

 

 

6. A content view controller manages all of its views by itself.

 ▶  콘텐츠 뷰 컨트롤러는 모든 뷰를 자체적으로 관리합니다.

 

7. A container view controller manages its own views plus the root views from one or more of its child view controllers.

 ▶  컨테이너 뷰 컨트롤러자체 뷰와 하나 이상의 자식 뷰 컨트롤러의 루트 뷰를 관리합니다.

 

8. The container does not manage the content of its children.

 ▶  컨테이너는 자식의 콘텐츠를 관리하지 않습니다.

 

9. It manages only the root view, sizing and placing it according to the container’s design.

 ▶  컨테이너는 루트 뷰만 관리하고, 컨테이너의 디자인에 따라 크기를 조정하고 배치합니다.

 

10. Figure 1-2 illustrates the relationship between a split view controller and its children.

 ▶  그림 1-2는 분할 뷰 컨트롤러와 그 하위 컨트롤러 간의 관계를 보여줍니다.

 

11. The split view controller manages the overall size and position of its child views, but the child view controllers manage the actual contents of those views.

 ▶  분할 뷰 컨트롤러는 자식 뷰의 전체 크기와 위치를 관리하지만, 자식 뷰 컨트롤러는 해당 뷰의 실제 내용을 관리합니다.

 

 

Figure 1-2 View controllers can manage content from other view controllers

 ▶  그림 1-2 뷰 컨트롤러는 다른 뷰 컨트롤러의 콘텐츠를 관리할 수 있습니다.

12. For information about managing your view controller’s views, see Managing View Layout.

 ▶  뷰 컨트롤러의 뷰 관리에 대한 자세한 내용은 뷰 레이아웃 관리를 참조하세요.

 


출처

 

View Controller Programming Guide for iOS: The Role of View Controllers

View Controller Programming Guide for iOS

developer.apple.com

 

댓글