In storyboard, when use segue to connect Viewcontrollers, we can choose
segue styles to have different way to open new screen.
When drag to connect ViewController, a pop up window show, choose
Present modally, then click to segue, go to attributes inspector, at transition,
if you choose Cover Vertical, new screen will slide up from bottom.
Choose Flip Horizontal, new screen spin like a door replace current
screen.
Choose Cross Dissolve, new screen simply appear replace current.
Choose Partial Curl, new screen curl up to replace current screen, this
good for reading book app.
If you don’t use storyboard, we can do this entire in code.
let vc = newclass()
let mod: UIModalTransitionStyle = UIModalTransitionStyle.FlipHorizontal
vc.modalTransitionStyle = mod
self.presentViewController(vc, animated: true, completion: nil)
No comments:
Post a Comment