UINavigationControllerオブジェクトを作成し、ウィンドウのrootViewControllerプロパティとして設定しました。オブジェクトのrootViewControllerはUINavigationControllerと呼ばれるクラスUINavigationMenuViewControllerです。UINavigationMenuViewControllerたとえば、からに移動したい場合はUIUserProfileViewController、次を使用できます。
navigationController!.pushViewController(userProfileVC, animated: true)
としても
navigationController?.pushViewController(userProfileVC, animated: true)
効果は同じようです。私は違いが何であるか疑問に思っています。2 番目の方法の方が安全だと思います。UINavigationMenuViewControllerオブジェクトを に埋め込むのを忘れた場合でもUINavigationController、最初の方法と比較して、アプリはクラッシュしません。これはオプショナル チェーンとも呼ばれていると思いますが、まだ Swift を学んでいるのでよくわかりません。
アドバイスをお願いします。