title: Dynamic button with Lottie
body: <p>I want to create button with three different states namely Initial, Loading, Completed.</p>
  
  <p><strong>UI for button state:</strong></p>
  
  <p><a href="https://i.stack.imgur.com/hxwzv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hxwzv.png" alt="enter image description here"></a></p>
  
  <p>Initial -> TextLabel</p>
  
  <p><a href="https://i.stack.imgur.com/dAmTl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dAmTl.png" alt="enter image description here"></a></p>
  
  <p>Loading -> Loading indicator/multiple images</p>
  
  <p><a href="https://i.stack.imgur.com/4QwcS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4QwcS.png" alt="enter image description here"></a></p>
  
  <p>Completed -> TextLabel</p>
  
  <p>It will be in <strong>Initial</strong> state normally when user clicks it then It will change its state to <strong>Loading</strong> with transforming itself to show loading indicator inside it. Once completed it will animate and transform to show the label.</p>
  
  <p>How can I achieve it with Lottie? 
  I need to set initial and completed state texts dynamically but as per the docs I couldn't find out a way to change text into Lottie.</p>
  
  <p>With Lottie I can use progress animation to handle different states of button but how can I change texts programatically without new json file.</p>
  
  <p>Lottie doesn't support text layer in iOS. Any workaround for that except using shape layer?</p>