title: Using an LSR image on a UIButton
body: <p>I am creating a tvOS app and I want to use parallax images on a couple of buttons. From <a href="https://developer.apple.com/library/prerelease/tvos/documentation/General/Conceptual/AppleTV_PG/CreatingParallaxArtwork.html" rel="nofollow">the docs</a>:</p>
  
  <blockquote>
    <p>To incorporate parallax images in your app:</p>
    
    <ol>
    <li>Create a UIImage object.</li>
    <li>You load the image differently depending on whether the image is included in your app bundle or whether you have downloaded the
    image.
    
    <ul>
    <li>Bundle—Load images using imageNamed:.</li>
    <li>Downloaded file—Load images using imageWithContentsOfFile:.</li>
    </ul></li>
    <li>Create a new UIImageView object using the loaded images.</li>
    <li>If the UIImageView is part of another view, set adjustsImageWhenAncestorFocused to YES on the UIImageView.</li>
    </ol>
  </blockquote>
  
  <p>I know it says <code>UIImageView</code> there, but I was hoping to make the same effect happen on a <code>UIButton</code>, like the home screen app icons.</p>
  
  <p>I've created the artwork, made a stack in the asset catalog, and loaded the image with <code>imageNamed:</code>, but the <code>UIButton</code> does not behave like a parallax image. It does not sway around like the home-screen icons do. It just looks like a flat image.</p>
  
  <p>Is there something else I have to enable in order for the <code>UIButton</code> to behave like the home screen app icons?</p>
  
  <pre><code>UIButton* quitGame = [[UIButton alloc] initWithFrame:rectWithNewX(playAgain.frame, 985)];
  [quitGame setImage:[UIImage imageNamed:@"quit.lsr"] forState:UIControlStateNormal];
  [quitGame setAdjustsImageWhenHighlighted:YES];
  fadeIn(quitGame, self.view, 0.5);
  </code></pre>