Skip to content

Bounds와 Frame의 차이점을 설명하시오. #1

Open

Description

@Glsme

정의

Frame

  • SuperView(상위뷰)의 좌표시스템안에서 View의 위치와 크기를 나타낸다.
  • View의 위치나 크기를 설정할 때 사용.

Bounds

  • 자신만의 좌표시스템안에서 View의 위치와 크기를 나타낸다.
  • View 내부에 그림을 그릴 때 사용.
  • transformation 후 View 크기를 알고 싶을 때 사용.
  • 하위 View를 정렬하는 것과 같이 내부적으로 변경하는 경우에 사용.



공통점

  • 타입이 CGRect 이다.
  • 좌표(x, y)와 길이(너비, 높이)를 가지고있다.



차이점

Frame Bounds
좌표 시스템 자신이 속해있는 superView를 기준 자신의 좌표 시스템을 사용

Activity

  1. changed the title [-]Bounds 와 Frame 의 차이점을 설명하시오.[/-] [+]Bounds와 Frame의 차이점을 설명하시오.[/+] on Jan 3, 2023
  2. reopened this on Jan 3, 2023
  3. reopened this on Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions