2015-04-23 21 views
0

我試圖在UILabel上快速製作一個簡單的淡入淡出動畫,但我得到'無法調用.. 。' 錯誤信息。無法調用「animationWithDuration」錯誤消息在UILabel上快速淡出

@IBOutlet weak var sendButtonLabel: UILabel? 

UIView.animateWithDuration(1.5, animations: { 
      self.sendButtonLabel?.alpha = 1.0 
     }) 

enter image description here

預先感謝任何幫助:)

+0

嘗試清潔您的項目,刪除derrived數據,或嘗試鑄造的持續時間增加一倍使用:雙(1.5) –

+0

我試過所有三個,這仍然無法正常工作:/ – StrawHara

+1

在這裏編譯得很好。你能發佈更多的代碼 - 全班?這個問題可能在其他地方。 – Gregzo

回答

0

試試這個:

UIView.animateWithDuration(1.5, animations: { 
      self.sendButtonLabel?.alpha = 1 
      }, completion: nil) 
相關問題