ios - Swift: Simple Animation? -
i have button , textview on vc. textview automatically hidden.
textview.hidden = true
if press button, textview shows up.
@ibaction func buttonispressed(sender: anyobject) { textview.hidden = false }
is there way add simple "fade" animation textview?
i mean if press button, textview should fade in.
i heard facebooks pop framework, isn't there easier way?
//instead of textview.hidden = true
textview.alpha = 0
//now on press action
@ibaction func buttonispressed(sender: anyobject) { uiview.animatewithduration(1.0, animations: { () -> void in self.textview.alpha = 1.0 }) }
Comments
Post a Comment