-
(iOS) TabBarController 이해하기iOS💖 2022. 12. 21. 21:07
✔️ 언제 사용해야 할까?
- 제공하고 싶은 기능들이 많아질 때
- Super App의 기본 조건
✔️ 개념 익히기
- UITabbarController 를 이용하여 구현한다.
- UITabbarController 안에서, 각각의 탭바에 ViewController 설정할 수 있다.
- 코드에서 각 ViewController은 setViewControllers() 메소드로 설정
- 설정된 ViewController를 확인할때는, UITabbarController 의 viewControllers 프로퍼티로 확인 가능
- selectedIndex 를 통해서 선택된 뷰컨트롤러 확인 가능
- 각 Tab Bar Item 은 UITabBarItem 으로 구성된다.
- 각 ViewController에서 image , title 프로퍼티 설정 가능
✔️ 애플 공식문서
https://developer.apple.com/documentation/uikit/uitabbarcontroller

'iOS💖' 카테고리의 다른 글
(iOS) constraints update 안될때 단축키 (0) 2022.12.22 (iOS) StackView 뿌시기💔 (1) 2022.12.22 (iOS) randomElement() - 랜덤으로 값 꺼내기 (2) 2022.12.22 (Xcode) Lable 줄바꿈 (0) 2022.12.21 🥗 Swift grammar #01 - Basic Data type, Collection (1) 2022.12.16