Improve Swift compatibility of ASCellNodeVisibilityEvent by using NS_ENUM macro

This commit is contained in:
Eric Jensen
2016-03-21 11:10:28 -07:00
parent bae2f232f0
commit b733936133

View File

@@ -14,9 +14,9 @@ NS_ASSUME_NONNULL_BEGIN
typedef NSUInteger ASCellNodeAnimation;
typedef enum : NSUInteger {
/**
* Indicates a cell has just became visible
typedef NS_ENUM(NSUInteger, ASCellNodeVisibilityEvent) {
/**
* Indicates a cell has just became visible
*/
ASCellNodeVisibilityEventVisible,
/**
@@ -26,11 +26,11 @@ typedef enum : NSUInteger {
* Use CGRectIntersect between cellFrame and scrollView.bounds to get this rectangle
*/
ASCellNodeVisibilityEventVisibleRectChanged,
/**
* Indicates a cell is no longer visible
/**
* Indicates a cell is no longer visible
*/
ASCellNodeVisibilityEventInvisible,
} ASCellNodeVisibilityEvent;
};
/**
* Generic cell node. Subclass this instead of `ASDisplayNode` to use with `ASTableView` and `ASCollectionView`.