Can someone please tell me what I am doing wrong here? All I'm trying to do is add a parallax image to a system type UIButton.
Here's what I'm doing;
1. Add System Button to Storyboard & wire it up to the UIViewController
2. Select the (parallax) image for the button in the Button Attributes Inspector pane (Image for Default, Focused, & Highlighted Stage Config)
3. In ViewController.m file:
- (void)viewDidLoad {
_testButton.imageView.adjustsImageWhenAncestorFocused = YES;
_testButton.clipsToBounds = NO;
// AND ALSO TRIED:
//self.testButton.imageView.adjustsImageWhenAncestorFocused = YES;
//self.testButton.clipsToBounds = NO;
}
The parallax effect works, but is confined "inside" of the button. ie. the image parallax movement and gloss effect is visible, but the overall button itself (edges and shadow) just won't dance along. What's the problem here?