Swift简单View缩放动画
// 先直接贴代码,迟点整理下233333
// 给动画的
// 给动画的
// 给动画的
@IBOutlet weak var threeBtnView: UIView!
@IBOutlet weak var archView: UIView!
the girl next door@IBOutlet weak var grayView: UIView!
@IBOutlet weak var forMapView: UIView!
var zoomedInSearchView:Bool = true
var archViewOriginalHeight:CGFloat!
var grayViewOriginalHeight:CGFloat!
日程安排英文
@IBOutlet weak var archHeightCon: NSLayoutConstraint!
yanyu>where is the love@IBOutlet weak var grayViewHeightCon: NSLayoutConstraint!
@IBAction func zoomSearchView(_ nder: Any){
archView.clipsToBounds = true
if zoomedInSearchView {
UIView.animate(withDuration: 0.3, delay: 0, options: UIViewAnimationOptions.curveEaIn, animations: {
stant = stant * 0.5
lf.archView.bounds = CGRect(x: 0, y: lf.archViewOriginalHeight*0.5, width: lf.archView.bounds.width, height: lf.archView.bounds.height)
// lf.archView.frame = CGRect(x: 0, y: lf.archView.frame.minY, width: lf.archView.bound
qe是什么意思s.width, height: lf.archViewOriginalHeight*0.5)
// lf.grayView.frame = CGRect(x: lf.grayView.frame.minX, y: lf.grayView.frame.minY, width: lf.grayView.frame.width, height: lf.grayViewOriginalHeight)
lf.view.layoutIfNeeded()
lf._mapView.frame = CGRect(x: 0, y: 0, width: lf.forMapView.frame.width, height: lf.forMapView.frame.height)
lf.view.layoutIfNeeded()
}, completion: nil)
zoomedInSearchView = fal
工业工程考研}上海培训
el{
UIView.animate(withDuration: 0.3, delay: 0, options: UIViewAnimationOptions.curveEaIn, animatio
汉语国际教育学什么ns: {
stant = stant*2
lf.archView.bounds = CGRect(x: 0, y: 0, width: lf.archView.bounds.width, height: lf.archView.bounds.height)
// lf.grayView.frame = CGRect(x: lf.grayView.frame.minX, y: lf.grayView.frame.minY, width: lf.grayView.frame.width, height: lf.grayViewOriginalHeight)
// lf._mapView.frame = CGRect(x: 0, y: lf.grayView.frame.maxY+10, width: lf.view.frame.width, height: lf.view.frame.height - (lf.grayView.frame.maxY+10) - lf.view.layoutIfNeeded()
lf._mapView.frame = CGRect(x: 0, y: 0, width: lf.forMapView.frame.width, height: lf.forMapView.frame.height)
lf.view.layoutIfNeeded()
}, completion: nil)
zoomedInSearchView = true
}
}
var grayViewZoomed:Bool = true
@IBAction func grayViewZoom(_ nder: Any) {
grayView.clipsToBounds = true
if grayViewZoomed {
UIView.animate(withDuration: 0.3, delay: 0, options: UIViewAnimationOptions.curveEaOut, animations: {
// lf.grayView.frame = CGRect(x: lf.grayView.frame.minX, y: lf.grayView.frame.minY, width: l
lf._mapView.frame = CGRect(x: 0, y: 0, width: lf.forMapView.frame.width, height: lf.forMapView.frame.height)
lf.view.layoutIfNeeded()
}, completion: nil)
grayViewZoomed = fal
}
el{
UIView.animate(withDuration: 0.3, delay: 0, options: UIViewAnimationOptions.curveEaIn, animations: {
// lf.grayView.frame = CGRect(x: lf.grayView.frame.minX, y: lf.grayView.frame.minY, width: lf.grayView.frame.width, height: lf.grayViewOriginalHeight)
// lf.grayView.frame = CGRect(x: lf.grayView.frame.minX, y: lf.grayView.frame.minY, width: lf.grayView.frame.width, height: lf.grayViewOriginalHeight)
cute怎么读
// lf._mapView.frame = CGRect(x: 0, y: lf.grayView.frame.maxY+10, width: lf.view.frame.width, height: lf.view.frame.height - (lf.grayView.frame.maxY+10) - lf.view.layoutIfNeeded()
lf._mapView.frame = CGRect(x: 0, y: 0, width: lf.forMapView.frame.width, height: lf.forMapView.frame.height)
lf.view.layoutIfNeeded()
}, completion: nil)