An object that manages the content for a rectangular area on the screen.
@MainActor class UIView : [UIResponder](<https://developer.apple.com/documentation/uikit/uiresponder>)
Views are the fundamental building blocks of your app’s user interface, and the UIView
class defines the behaviors that are common to all views. A view object renders content within its bounds rectangle, and handles any interactions with that content. The UIView
class is a concrete class that you can instantiate and use to display a fixed background color. You can also subclass it to draw more sophisticated content. To display labels, images, buttons, and other interface elements commonly found in apps, use the view subclasses that the UIKit framework provides rather than trying to define your own.
View
는 앱 사용자 인터페이스의 기본 구성 요소이며 UIView
클래스는 모든 보기에 공통적인 동작을 정의합니다. 뷰 객체는 경계 사각형 내에서 콘텐츠를 렌더링하고 해당 콘텐츠와의 모든 상호 작용을 처리합니다. UIView
클래스는 인스턴스화하고 고정된 배경색을 표시하는 데 사용할 수 있는 구체적인 클래스입니다. 더 정교한 콘텐츠를 그리기 위해 하위 분류할 수도 있습니다. 앱에서 흔히 볼 수 있는 레이블, 이미지, 버튼 및 기타 인터페이스 요소를 표시하려면 직접 정의하려고 하기보다 UIKit
프레임워크가 제공하는 뷰 하위 클래스를 사용하세요.Because view objects are the main way your application interacts with the user, they have a number of responsibilities. Here are just a few:
View
객체는 응용 프로그램이 사용자와 상호 작용하는 주요 방법이기 때문에 여러 가지 책임이 있습니다. 다음은 몇 가지입니다.View
는 UIKit
또는 Core Graphics
를 사용하여 직사각형 영역에 콘텐츠를 그립니다.View
속성을 새 값으로 애니메이션할 수 있습니다.View
에는 0개 이상의 하위 View
가 포함될 수 있습니다.View
는 하위 View
의 크기와 위치를 조정할 수 있습니다.View
계층 구조의 변경에 대한 응답으로 View
의 크기를 조정하고 위치를 변경하는 규칙을 정의합니다.UIResponder
and can respond to touches and other types of events.View
는 UIResponder의 하위 클래스이며 터치 및 기타 유형의 이벤트에 응답할 수 있습니다.View
는 일반적인 제스처를 처리하기 위해 제스처 인식기를 설치할 수 있습니다.