将页面全部控件上移动和还原

阅读更多

    

    @IBActionfunc password_keyboard_begin(sender: AnyObject) {

//        let transform_up_100 = CGAffineTransformMakeTranslation(0, -150)

//        UIView.beginAnimations(nil, context: nil)

//        for one_subview in self.view.subviews{

//            one_subview.transform = transform_up_100

//        }

//        UIView.setAnimationDuration(3)

//        UIView.commitAnimations()

    }

    

    @IBActionfunc password_keyboard_end(sender: AnyObject) {

//        let transform_origin = CGAffineTransformMakeTranslation(0, 0)

//        UIView.beginAnimations(nil, context: nil)

//        for one_subview in self.view.subviews{

//            one_subview.transform = transform_origin

//        }

//        UIView.setAnimationDuration(3)

//        UIView.commitAnimations()

 

    }

你可能感兴趣的:(swift,ios,动画)