k-vyn / framer-ios-kit

MIT License
520 stars 37 forks source link

Animate Text Layer #17

Closed theposch closed 8 years ago

theposch commented 8 years ago

Is it possible to change the text of a Text Layer? Example:

text = new ios.Text
    text: 'Initiating...'
    font: 'Vaud'
    fontSize: 20
    textAlign: 'center'
    color: '#fff'
    fontWeight: 400
    constraints:
        leading: 16
        top: 350
        width: 320
    opacity: 0

text.states.add
    one: 
        text: "Communicating with server..."

    two:
        text: "Completing upload..."
k-vyn commented 8 years ago

Yeah, you change the text's html. In the last update, I pushed a change that when you modify the html by default, it'll resize the layer to the new string.

I'm not sure it'll work with Framer's states. It may because it's just working with the HTML property.