Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shrink LayoutSpec classes #1502

Merged
merged 1 commit into from
May 10, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Source/Layout/ASStackLayoutDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#import <AsyncDisplayKit/ASBaseDefines.h>

/** The direction children are stacked in */
typedef NS_ENUM(NSUInteger, ASStackLayoutDirection) {
typedef NS_ENUM(unsigned char, ASStackLayoutDirection) {
/** Children are stacked vertically */
ASStackLayoutDirectionVertical,
/** Children are stacked horizontally */
Expand All @@ -24,7 +24,7 @@ typedef NS_ENUM(NSUInteger, ASStackLayoutDirection) {
};

/** If no children are flexible, how should this spec justify its children in the available space? */
typedef NS_ENUM(NSUInteger, ASStackLayoutJustifyContent) {
typedef NS_ENUM(unsigned char, ASStackLayoutJustifyContent) {
/**
On overflow, children overflow out of this spec's bounds on the right/bottom side.
On underflow, children are left/top-aligned within this spec's bounds.
Expand Down Expand Up @@ -58,7 +58,7 @@ typedef NS_ENUM(NSUInteger, ASStackLayoutJustifyContent) {
};

/** Orientation of children along cross axis */
typedef NS_ENUM(NSUInteger, ASStackLayoutAlignItems) {
typedef NS_ENUM(unsigned char, ASStackLayoutAlignItems) {
/** Align children to start of cross axis */
ASStackLayoutAlignItemsStart,
/** Align children with end of cross axis */
Expand All @@ -78,7 +78,7 @@ typedef NS_ENUM(NSUInteger, ASStackLayoutAlignItems) {
Each child may override their parent stack's cross axis alignment.
@see ASStackLayoutAlignItems
*/
typedef NS_ENUM(NSUInteger, ASStackLayoutAlignSelf) {
typedef NS_ENUM(unsigned char, ASStackLayoutAlignSelf) {
/** Inherit alignment value from containing stack. */
ASStackLayoutAlignSelfAuto,
/** Align to start of cross axis */
Expand All @@ -92,13 +92,13 @@ typedef NS_ENUM(NSUInteger, ASStackLayoutAlignSelf) {
};

/** Whether children are stacked into a single or multiple lines. */
typedef NS_ENUM(NSUInteger, ASStackLayoutFlexWrap) {
typedef NS_ENUM(unsigned char, ASStackLayoutFlexWrap) {
ASStackLayoutFlexWrapNoWrap,
ASStackLayoutFlexWrapWrap,
};

/** Orientation of lines along cross axis if there are multiple lines. */
typedef NS_ENUM(NSUInteger, ASStackLayoutAlignContent) {
typedef NS_ENUM(unsigned char, ASStackLayoutAlignContent) {
ASStackLayoutAlignContentStart,
ASStackLayoutAlignContentCenter,
ASStackLayoutAlignContentEnd,
Expand Down