Don_Mag icon

Untitled

Don_Mag | PRO | 07/24/24 11:34:36 AM UTC | 0 ⭐ | 7893 👁️ | Never ⏰ | []
Swift |

780 B

|

None

|

0 👍

/

0 👎

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
    }
    
}
 

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎