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
This code in URBSegmentedControl uses a block that refers to self. The problem is that self will be retained.
[UIView animateWithDuration:0.4 animations:^{ [self layoutSegments]; }];
Instead, it should be something like:
URBSegmentedControl * __weak weakSelf = self; [UIView animateWithDuration:0.4 animations:^{ URBSegmentedControl * strongSelf = weakSelf; if (strongSelf) { [strongSelf layoutSegments]; } }];
The text was updated successfully, but these errors were encountered:
Self will only be retained for the duration of the animation (In this case 0.4 seconds)
Sorry, something went wrong.
No branches or pull requests
This code in URBSegmentedControl uses a block that refers to self. The problem is that self will be retained.
Instead, it should be something like:
The text was updated successfully, but these errors were encountered: