如何从启动屏幕动画中删除选项卡栏?

时间:2019-03-26 11:42:01

标签: ios swift

当前,我有一个应用程序可以复制twitter加载屏幕动画,但是,每当我的动画运行时,选项卡栏都位于动画上方,我想我需要将视图更新为窗口而不是视图,但是我不确定该怎么做。

   override func viewDidLoad() {
    super.viewDidLoad()

    splashView.backgroundColor = UIColor(red: 65/255, green: 204/255, blue: 140/255, alpha: 1.0)

    view.addSubview(splashView) //needs to be window if you haave tab bar
    splashView.frame = CGRect(x: 0, y: 0, width: view.bounds.width, height: view.bounds.height)
    logoImage.contentMode = .scaleAspectFit
    splashView.addSubview(logoImage)
    logoImage.frame = CGRect(x: splashView.frame.midX - 35, y: splashView.frame.midY - 35, width: 70, height: 70)
}

override func viewDidAppear(_ animated: Bool) {
    super.viewDidAppear(animated)
    DispatchQueue.main.asyncAfter(deadline: .now()+2) {
        self.scaleDownAnimation()
    }
}

还可以使用scaleDownAnimation()scaleUpAnimation()和removeSplashScreen()函数。

0 个答案:

没有答案