We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, I need to add a new button on scratchView when the progres is +0.9. When I add the button, it is not clickable. How can I solve the problem?
Thanks
The text was updated successfully, but these errors were encountered:
I updated 'MDScratchSampleViewController.h' for testing your problem...
#pragma mark - MDScratchImageViewDelegate - (void)mdScratchImageView:(MDScratchImageView *)scratchImageView didChangeMaskingProgress:(CGFloat)maskingProgress { NSLog(@"%s %p progress == %.2f", __PRETTY_FUNCTION__, scratchImageView, maskingProgress); //Button test static BOOL isPresented = NO; if(maskingProgress > 0.5 && isPresented == NO){ isPresented = YES; UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom]; [btn setImage:[UIImage imageNamed:@"paint01-02blur"] forState:UIControlStateNormal]; btn.frame = CGRectMake(50, 50, 100, 100); [btn addTarget:self action:@selector(btnAction) forControlEvents:UIControlEventTouchUpInside]; [scratchImageView addSubview:btn]; } } -(void)btnAction{ NSLog(@"%s", __PRETTY_FUNCTION__); }
This is works fine. Please, check your button and button superviews user interaction. Check your button target action.
Sorry, something went wrong.
No branches or pull requests
Hi,
I need to add a new button on scratchView when the progres is +0.9. When I add the button, it is not clickable. How can I solve the problem?
Thanks
The text was updated successfully, but these errors were encountered: