-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
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];
}
}];
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels