Skip to content

Commit

Permalink
BEGIN_PUBLIC
Browse files Browse the repository at this point in the history
Get NimbusKit compiling with `-Woverriding-method-mismatch`
END_PUBLIC

PiperOrigin-RevId: 411635028
  • Loading branch information
Dave MacLachlan authored and material-automation committed Nov 22, 2021
1 parent d9719ff commit 182731f
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/models/src/NICellCatalog.m
Original file line number Diff line number Diff line change
Expand Up @@ -204,17 +204,23 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus
return self;
}

- (BOOL)shouldUpdateCellWithObject:(NIDrawRectBlockCellObject *)object {
- (BOOL)shouldUpdateCellWithObject:(id)object {
NSAssert([object isKindOfClass:[NIDrawRectBlockCellObject class]],
@"object must be NIDrawRectBlockCellObject");
NIDrawRectBlockCellObject *blockCell = (NIDrawRectBlockCellObject *)object;
NIDrawRectBlockView* blockView = (NIDrawRectBlockView *)self.blockView;
blockView.block = object.block;
blockView.object = object.object;
blockView.block = blockCell.block;
blockView.object = blockCell.object;
blockView.cell = self;
[blockView setNeedsDisplay];
return YES;
}

+ (CGFloat)heightForObject:(NIDrawRectBlockCellObject *)object atIndexPath:(NSIndexPath *)indexPath tableView:(UITableView *)tableView {
return object.block(tableView.bounds, object.object, nil);
+ (CGFloat)heightForObject:(id)object atIndexPath:(NSIndexPath *)indexPath tableView:(UITableView *)tableView {
NSAssert([object isKindOfClass:[NIDrawRectBlockCellObject class]],
@"object must be NIDrawRectBlockCellObject");
NIDrawRectBlockCellObject *blockCell = (NIDrawRectBlockCellObject *)object;
return blockCell.block(tableView.bounds, blockCell.object, nil);
}

@end

0 comments on commit 182731f

Please sign in to comment.