Skip to content

UIKit #7

Closed
Closed
@MoSonLee

Description

@MoSonLee
  • 우리가 늘 자연스럽게 import UIKIT하는 UIKIT은 무엇일까?
  • 애플 공식 문서를 보면 이렇게 적혀 있다.
  • image
  • 간단히 정리하자면 유저 인터페이스 도구를 통하여 iOS 앱을 구현할 수 있는 방법들을 제공한다고 보면 된다.
  • UIKit -> UIView -> UILabel, UIButton, UIImageView ...(윗 계층에서 하나씩 상속되는 것이다.)
  • UIKIT -> UIViewController -> UICollectionViewController, UITableViewController ...
  • UIColor -> red, blue ...(윗 계층에서 하나씩 상속되는 것이다.)
  • 우리가 코드를 작성할 때 import UIKit를 작성해주는 이유가 UIKit에 상속되는 View, ViewController 등을 사용해주기 위해서다.
  • 그렇다면 swiftUI로 코드를 짤 경우에는? -> 당연히 필요없다 그럴땐 import swiftUI를 작성하면 된다.
  • 위와 같이 우리가 UI를 작성할 때 사용되는 모든 components 들을 통합하고 있다고 보면 된다!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions