The problem is that your setProgress:
method calls the setProgress:
method - recursion.
- (void)setProgress:(CGFloat)value {
NSLog(@"what is going on here");
if (self.progress != value) {
self.progress = value; // <-- This calls [self setProgress:value]
[self setNeedsLayout];
}
}
Change the bad line to:
_progress = value;
Setting the ivar directly is always required when you implement the setter method of a property.