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

python - jinja2: TemplateSyntaxError: expected token ',', got 'string' -

Qt4: how to send QString inside a struct via QSharedMemory -

node.js - NodeJS remote terminal to Dropbear OpenWRT-Server -