William Falcon
William Falcon

Reputation: 9813

Button stop functioning after animation iOS

After I perform the slide method, the buttons on the UIView stop working after the method is called.

Any thoughts on what may be happening?

@implementation ResultSliderView

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
        self.frame = CGRectMake(10,255,0,0);

    }
    return self;
}

/*
This method slides the view up by animating
*/
-(void)slideUp{
    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationDuration:.5];
    [UIView setAnimationCurve:UIViewAnimationOptionAllowUserInteraction];
    self.frame = CGRectMake(5,38,0,0);
    [UIView commitAnimations];
}

Upvotes: 0

Views: 153

Answers (1)

rdelmar
rdelmar

Reputation: 104082

Your view has zero size, so the buttons will be outside its frame -- they don't receive touches when they're outside the frame (if your view doesn't have clip subviews set, you'll still see the buttons though).

Upvotes: 1

Related Questions