Comments (2)
Navigation controller에 대한 좋은 이슈 남겨 주셔서 감사합니다!
'1. NC는 눈에 보이는 화면이 아니다' 라고 하신 말을 맞는 말인 것 같습니다. NC는 눈에 보이는 view들을 연결한 view controller들을 관리하는 container view controller 입니다. view controller들 뿐만 아니라 navigation bar 라는 객체도 관리를 하지요.
그런데 NC로 관리되는 view controller들은 linked list가 아닌 array(NSArray)로 구현된 stack에 들어갑니다. stack 안에서 현재 보이는 view의 controller가 top에 위치하게 되고, root view의 controller가 bottom에 위치하게 됩니다.
실습을 할때 navigationController?.title = "waffle studio"가 view에 반영되지 않았던 것은, navigationController?.title과 연결된 view가 없기 때문입니다. 사실 제가 하려던 것은 navigationItem?.title = "waffle studio" 이었고, navigationItem은 해당 view controller와 연결된 view이기 떄문에 반영이 됩니다. 찾아주신 것처럼 ViewController의 property인 title = "waffle studio" 로 작성해도 타이틀이 반영이 됩니다. title과 navigationItem.title 중 무엇을 쓰는게 더 좋은지 생각해 봤는데, navigation controller 안에서는 의미상 navigationItem.title 가 더 정확하지만, title을 사용하면 tabbar controller를 쓰던 navigation controller를 쓰던 알아서 맞춰서 타이틀이 반영되어서 편합니다. 어떤 것을 써도 상관 없을 것 같습니다.
그런데 view가 연결되지 않은 navigationController?.title가 존재했던 이유는, NC가 view controller를 상속하기 때문입니다. 제 생각으로는 이게 상속의 단점 중에 하나인 것 같습니다. 필요 없는 property까지 상속을 해버린 거지요.
Navigation Controller에 대한 자세한 내용은 아래 링크를 참고하시면 됩니다!
https://developer.apple.com/documentation/uikit/uinavigationcontroller
from seminar-2021.
자세한 설명 감사합니다!
이슈 Close 하도록 하겠습니다.
from seminar-2021.
Related Issues (20)
- Android 과제 4번 signup POST body 전송 및 response에서 token을 추출하는 방법 HOT 11
- Nginx 배포 완료 후 서버가 작동하지 않는 문제
- 장고 과제4 서버 실행시 static file not found 에러 질문드립니다. HOT 11
- 안드로이드 과제4 Dagger Hilt로 만든 okhttpclient에서 logcat 출력 설정 방법 HOT 2
- local에서 Authorization Error HOT 2
- 백엔드 서버가 보낼 수 있는 여러 에러 응답 처리 관련 HOT 2
- 안드로이드 과제4 스펙 관련 HOT 2
- Django 과제4 RDS 데이터베이스 생성 요금?? HOT 3
- 안드로이드 과제4 에러 메시지 관련 HOT 3
- 장고 과제4 migration 관련 에러 질문 HOT 5
- RDS 생성 후 DATA GRIP 연동 부분에서 connection이 계속 fail합니다. HOT 1
- 장고 OperationalError: (1045, "Access denied for user 'waffle-backend'@'172.31.44.17') HOT 3
- 장고 과제4 nginx stop 혹은 restart 시 오류 관련 HOT 5
- nginx 502 bad gateway 에러 HOT 1
- 장고 과제 5 exception_handler을 찾지 못하는 문제 관련 HOT 4
- 장고 과제 4 Migration 관련 질의 HOT 1
- 장고 과제 5(2) 문제 의도 및 추가적인 질문 HOT 5
- 장고 과제 5(3) notebook 실행 오류 질문 HOT 8
- EC2에서 애플리케이션이 꺼지는 현상
- 안드로이드 과제 리뷰 관련하여 질문드립니다. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from seminar-2021.