diff --git a/Signal/src/ViewControllers/OWSTableViewController.h b/Signal/src/ViewControllers/OWSTableViewController.h index 02c0e3a3f..8685b38ae 100644 --- a/Signal/src/ViewControllers/OWSTableViewController.h +++ b/Signal/src/ViewControllers/OWSTableViewController.h @@ -37,7 +37,7 @@ typedef NS_ENUM(NSInteger, OWSTableItemType) { }; typedef void (^OWSTableActionBlock)(); -typedef UITableViewCell * (^OWSTableCustomCellBlock)(); +typedef UITableViewCell *_Nonnull (^OWSTableCustomCellBlock)(); @interface OWSTableItem : NSObject @@ -54,7 +54,7 @@ typedef UITableViewCell * (^OWSTableCustomCellBlock)(); + (OWSTableItem *)itemWithCustomCellBlock:(OWSTableCustomCellBlock)customCellBlock actionBlock:(nullable OWSTableActionBlock)actionBlock; -- (UITableViewCell *)customCell; +- (nullable UITableViewCell *)customCell; - (NSNumber *)customRowHeight; @end diff --git a/Signal/src/ViewControllers/OWSTableViewController.m b/Signal/src/ViewControllers/OWSTableViewController.m index c52de24e0..1d131d9e5 100644 --- a/Signal/src/ViewControllers/OWSTableViewController.m +++ b/Signal/src/ViewControllers/OWSTableViewController.m @@ -141,7 +141,7 @@ NS_ASSUME_NONNULL_BEGIN return item; } -- (UITableViewCell *)customCell +- (nullable UITableViewCell *)customCell { if (_customCell) { return _customCell; @@ -149,7 +149,6 @@ NS_ASSUME_NONNULL_BEGIN if (_customCellBlock) { return _customCellBlock(); } - OWSAssert(0); return nil; }