navigationController?.pushViewController(nextVC, animated: true)
present(nextVC, animated: true)
전체 화면으로 전환하고 싶을 때는 다음과 같이 구현했다:
let nextVC = UIViewController()
nextVC.modalPresentationStyle = .fullScreen
present(nextVC, animated: true)
let mainVC = MainVC()
let navigationController = UINavigationController(rootViewController: mainVC)
새 네비게이션 컨트롤러를 생성하여 이전 스택을 초기화하는 방법이다:
let mainVC = MainVC()
let navigationController = UINavigationController(rootViewController: mainVC)
navigationController.modalPresentationStyle = .fullScreen
present(navigationController, animated: true)
.inset(16)
으로 설정했다화면 전환 시 네비게이션 흐름 고려하기
제약조건이 터치 영역에 영향을 주는지 확인
전체 화면 전환이 필요한 경우 .fullScreen
스타일 활용
이번 트러블슈팅을 통해 화면 전환과 제약조건이 사용자 경험에 큰 영향을 미친다는 것을 배웠다. 특히 터치 영역과 관련된 문제는 실제 사용성 테스트를 통해 조기 발견하는 것이 중요하다는 점을 깨달았다.