diff --git a/Clocker/Custom Table Cell Views/CLTimezoneCellView.h b/Clocker/Custom Table Cell Views/CLTimezoneCellView.h index 3ee4fec..1237652 100644 --- a/Clocker/Custom Table Cell Views/CLTimezoneCellView.h +++ b/Clocker/Custom Table Cell Views/CLTimezoneCellView.h @@ -19,7 +19,7 @@ - (void)updateTextColorWithColor:(NSColor *)color andCell:(CLTimezoneCellView*)cell; -- (void)setUpAutoLayoutWithCell:(CLTimezoneCellView *)cell; +- (void)setUpAutoLayoutWithCell; - (void)setAppropriateFont; @end diff --git a/Clocker/Custom Table Cell Views/CLTimezoneCellView.m b/Clocker/Custom Table Cell Views/CLTimezoneCellView.m index 3a31ea1..9907670 100644 --- a/Clocker/Custom Table Cell Views/CLTimezoneCellView.m +++ b/Clocker/Custom Table Cell Views/CLTimezoneCellView.m @@ -156,13 +156,13 @@ } } -- (void)setUpAutoLayoutWithCell:(CLTimezoneCellView *)cell +- (void)setUpAutoLayoutWithCell { - CGFloat width = [cell.relativeDate.stringValue - sizeWithAttributes: @{NSFontAttributeName:cell.relativeDate.font}].width; + CGFloat width = [self.relativeDate.stringValue + sizeWithAttributes: @{NSFontAttributeName:self.relativeDate.font}].width; - [cell.relativeDate.constraints enumerateObjectsUsingBlock:^(NSLayoutConstraint * _Nonnull constraint, NSUInteger idx, BOOL * _Nonnull stop) { + [self.relativeDate.constraints enumerateObjectsUsingBlock:^(NSLayoutConstraint * _Nonnull constraint, NSUInteger idx, BOOL * _Nonnull stop) { if (constraint.constant > 20) { constraint.constant = width+8;