我試圖動畫是否隱藏,似乎工作確定,但如果我錯誤地設置yes
到真正的5倍動畫是否隱藏=假 5次,然後有時候我應該動畫是否隱藏= true 2或更多時間讓我的UIView可見!UIView.animate不是動畫布爾值完全
我錯過了什麼嗎?
if (yes)
{
UIView.animate(withDuration: 0.3, delay:0, animations: {
myLabel.isHidden=false
}
}
else
{
UIView.animate(withDuration: 0.3, delay:0, animations: {
myLabel.isHidden=true
}
}
但我需要,所以它從視圖中刪除後自動版式縮小布局動畫是否隱藏。 – AVEbrahimi
@Avebrahimi請檢查我更新的答案。 –