//更改锚点
func setViewAnchorPoint(view: UIView, anchorPoint: CGPoint) {
view.layer.anchorPoint = anchorPoint
view.top -= (0.5 - anchorPoint.y) * view.height
view.left -= (0.5 - anchorPoint.x) * view.width
}
//更改锚点
func setViewAnchorPoint(view: UIView, anchorPoint: CGPoint) {
view.layer.anchorPoint = anchorPoint
view.top -= (0.5 - anchorPoint.y) * view.height
view.left -= (0.5 - anchorPoint.x) * view.width
}