You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.5 KiB

5 years ago
5 years ago
5 years ago
  1. //
  2. // FLEXTableView.h
  3. // FLEX
  4. //
  5. // Created by Tanner on 4/17/19.
  6. // Copyright © 2019 Flipboard. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #pragma mark Reuse identifiers
  10. typedef NSString * FLEXTableViewCellReuseIdentifier;
  11. /// A regular \c UITableViewCell initialized with \c UITableViewCellStyleDefault
  12. extern FLEXTableViewCellReuseIdentifier const kFLEXDefaultCell;
  13. /// A \c FLEXSubtitleTableViewCell initialized with \c UITableViewCellStyleSubtitle
  14. extern FLEXTableViewCellReuseIdentifier const kFLEXDetailCell;
  15. /// A \c FLEXMultilineTableViewCell initialized with \c UITableViewCellStyleDefault
  16. extern FLEXTableViewCellReuseIdentifier const kFLEXMultilineCell;
  17. /// A \c FLEXMultilineTableViewCell initialized with \c UITableViewCellStyleSubtitle
  18. extern FLEXTableViewCellReuseIdentifier const kFLEXMultilineDetailCell;
  19. #pragma mark - FLEXTableView
  20. @interface FLEXTableView : UITableView
  21. + (instancetype)flexDefaultTableView;
  22. + (instancetype)groupedTableView;
  23. + (instancetype)plainTableView;
  24. /// You do not need to register classes for any of the default reuse identifiers above
  25. /// (annotated as \c FLEXTableViewCellReuseIdentifier types) unless you wish to provide
  26. /// a custom cell for any of those reuse identifiers. By default, \c FLEXTableViewCell,
  27. /// \c FLEXSubtitleTableViewCell, and \c FLEXMultilineTableViewCell are used, respectively.
  28. ///
  29. /// @param registrationMapping A map of reuse identifiers to \c UITableViewCell (sub)class objects.
  30. - (void)registerCells:(NSDictionary<NSString *, Class> *)registrationMapping;
  31. @end