Swift ViewController 관련 내가 자주 쓰는 부분 (생각보다 편함)
생각보다 뷰를 이동하거나 닫는 방법은 여러가지가 있습니다. 그래서 저도 헷갈리고 잘 까먹어서 모아보았습니다. 참고로 진짜 모아만 둔거라 설명은 따로 없습니다. 보통 뷰는 수직으로 쌓이는 샌드위치라고 생각하면 이해하기 쉽더라고요. * ViewController func moveView(viewController : UIViewController,viewName : String){ let vc = viewController.storyboard!.instantiateViewController(withIdentifier: viewName) vc.modalPresentationStyle = .fullScreen viewController.present(vc, animated: true) } * ViewContro..
iOS개발/Swift 기본
2022. 12. 12. 15:49