How can move to another page directly without click a button in Swift.
Like when you open a Twitter you see the first page it's a Twitter logo then directly move to timeline page. How to create it?
That is the launch screen. when you open the app from the killed state then it's launch screen will be showing first then after view controller which you show first time on app launch. You can add a launch screen via two methods.
You need to add a launch image in assets
Use launchScreen storyboard.
Check out these tutorials
https://useyourloaf.com/blog/using-a-launch-screen-storyboard/
https://www.appcoda.com/how-to-add-splash-screen-in-your-ios-app/
If you want to move to another screen after some duration, I suggest you add a timer and once the timer is fired perform a segue:
_ = Timer.scheduledTimer(timeInterval: 2.0, target: self, selector: #selector(moveToNextView), userInfo: nil, repeats: false)
@objc func moveToNextView() { self.performSegue(withIdentifier: "segueId", sender: nil) }
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.