Swift简单View缩放动画

更新时间:2023-06-23 07:35:57 阅读: 评论:0

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: {
pig什么意思
// 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)

本文发布于:2023-06-23 07:35:57,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/90/154610.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:考研   缩放   整理   培训   教育学   工程   动画
相关文章
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图