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

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -