1,firstvcview for your current view 2,secondvcview as you need to jump to the view 3,viewcon with the second item do not pass in the view directly into the object.
* Here is the call uiviewobject for you to jump the class ID is the value you need to pass
Let view = Uiviewobject ()
View.id = Self.id
Self.performanimationback (Self.view, SecondVCView:lineList.view, Viewcon:linelist)
Custom Cut animation func performanimationback (Firstvcview:uiview, Secondvcview:uiview, Viewcon:uiviewcontroller) { Assign the source and destination views to the local variables. Get the screen width and height. Let ScreenWidth = Uiscreen.mainscreen (). bounds.size.width Let screenheight = Uiscreen.mainscreen (). Bounds.size.heig HT//Specify the initial position of the destination view. Secondvcview.frame = CGRectMake (-screenwidth, 0.0, screenwidth, screenheight)//Access The app ' s key windo W and insert the destination view above the current (source) one. let window = Uiapplication.sharedapplication (). keywindow window?. Insertsubview (Secondvcview, Abovesubview:firstvcview)//Animate the transition. Uiview.animatewithduration (0.4, animations: {(), Void in firstvcview.frame = Cgrectoffset (Firstvcview.fra Me, ScreenWidth, 0.0) Secondvcview.frame = CgrecToffset (Secondvcview.frame, ScreenWidth, 0.0)}) {(finished)-Void in//Self.dismissviewco Ntrolleranimated (True, Completion:nil) Self.presentviewcontroller (Viewcon, ANIMATED:FA LSE, COMPLETION:NIL)}}
IOS Custom Transition Animations