UITabBarController와 UITabBar

1Consumption·2020년 7월 6일
1

UITabBar와 UITabBarController의 차이점은 무엇인가?

UITabBar는 UIView를 상속 받음.
UITabBarController는 UIViewController를 상속 받음.

UITabBarController는 containerViewController이며 하위 viewController를 가질 수 있음. UITabBarController의 Tabbar에 있는 tabBarItem을 클릭하면 알맞는 viewController의 root view를 present 해준다.

UITabBar는 보통 UITabBarController와 결합되어 쓰이지만, 단독으로 쓰일 수도 있다. UITabBar는 항상 화면의 하단에 위치하며 하나 이상의 UITabBarItem을 표시한다.

TabBar와 ToolBar의 차이점

  • TabBar
    • radio style임(한 번에 하나만 선택 가능)
    • 앱의 모드를 결정함.
      전혀 다른 기능이나 UI를 표시한다는 것을 앱의 모드를 바꾼다고 하는 듯
      ex)시계 앱을 보면 UITabBarController가 embeded 되어 있는데, TabBarItem을 클릭하면 대략적으로 비슷한 기능이지만 UI가 전혀 다름. 그것을 "모드를 바꾼다"라고 하는건가봅니다.
  • ToolBar
    • 현재 content에 대한 추가 기능을 나타냄.

참고문서

UITabBarcontroller 공식 문서
UITabBar 공식 문서
UITabBar HIG
UIToolBar HIG

profile
개발자가되고싶어요

2개의 댓글

comment-user-thumbnail
2020년 7월 6일

wow freaking awesome!!!
I looking forward to the next feed

답글 달기
comment-user-thumbnail
2020년 7월 6일

Amazing.... and gorgeous

답글 달기