Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import UIKit
- class SLNavigationViewController: UINavigationController {
- }
- class SLLoadingViewController: UIViewController {
- override func viewDidLoad() {
- super.viewDidLoad()
- view.backgroundColor = .systemYellow
- }
- override func viewDidAppear(_ animated: Bool) {
- super.viewDidAppear(animated)
- let nav = SLNavigationViewController()
- let mainView = StoreViewController()
- nav.navigationBar.frame.size = nav.navigationBar.sizeThatFits(CGSize(width: nav.navigationBar.frame.size.width, height: 2))
- nav.viewControllers = [mainView]
- present(nav, animated: false, completion: nil)
- }
- }
- class StoreViewController: UIViewController {
- override func viewDidLoad() {
- super.viewDidLoad()
- view.backgroundColor = .systemGreen
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement