pushViewController 3

[Navigation] Only Code (pushViewController()로 화면 전환)

코드로만 화면 전환을 하기 위해서는 Scene Delegate 파일에서 네비게이션 컨트롤러를 뷰 컨트롤러 밑에 깔아야 한다.  Scene Delegate 파일에서 scene(scene:session:connectionOptions:) 함수에 아래의 코드를 추가한다.func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. // If..

UIKit 2024.08.01

[Navigation] Storyboard + Code2 (pushViewController()로 화면 전환)

Navigation 을 코드로 객체생성하여 push()로 화면 전환  [Navigation] Storyboard + Code (pushViewController()로 화면 전환)Navigation 을 스토리보드로 객체생성하여 push()로 화면 전환 // 객체 생성guard let secondViewController = storyboard?.instantiateViewController(withIdentifier: "SecondVC") as? SecondVIewController else { return }//secondViewController.usiacode.tistory.com위 방법과 거의 동일하지만, 객체를 생성하는 방법이 차이가 있다. 위 방법은 스토리보드의 아이디를 통해 뷰 컨트롤러 객체를..

UIKit 2024.08.01

[Navigation] Storyboard + Code1 (pushViewController()로 화면 전환)

Navigation 을 스토리보드로 객체생성하여 push()로 화면 전환  [Navigation] Storyboard + Code2 (pushViewController()로 화면 전환)Navigation 을 코드로 객체생성하여 push()로 화면 전환  [Navigation] Storyboard + Code (pushViewController()로 화면 전환)Navigation 을 스토리보드로 객체생성하여 push()로 화면 전환 // 객체 생성guard let secondViewCusiacode.tistory.com // 객체 생성 guard let secondViewController = storyboard?.instantiateViewController(withIdentifier: "SecondVC..

UIKit 2024.07.31