개발언어/Swift
스위프트 네비게이션 탭 바(navagation tab bar)
우주먼지쪼가리
2021. 8. 12. 20:52
반응형
1.storyboard 기본 레이아웃 제거
2.navigation view controller
3.두번째 navigation layout 지움
4.첫번째 navigation -> is initial view controller 지정
5.uiview controller 하나 만듬
6.첫번째 navigation에서 control 키 누르면서 드래그 후 root view controller 로 지정
7. + 누른 후 -> bar button item 검색 후 끌어와서 상위 탭바 붙이고 싶은 위치에 붙임
- 클릭해서 다른 layout으로 가고 싶은 경우,
1. ui view controller 하나 가져옴
2.탭바 아이콘 클릭하고 -> control누르면서 새로 가져온 controller쪽으로 드래그 -> show 클릭
import UIKit
class ViewController: UINavigationController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
}
반응형