This repository was archived by the owner on Feb 2, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
AsyncDisplayKit.xcodeproj Expand file tree Collapse file tree Original file line number Diff line number Diff line change 15251525 058D09B9195D04C000B7D73C /* Frameworks */,
15261526 058D09BA195D04C000B7D73C /* Resources */,
15271527 3B9D88CDF51B429C8409E4B6 /* Copy Pods Resources */,
1528+ <<<<<<< HEAD
1529+ =======
1530+ 5ADEA7587189397768F2B36C /* Embed Pods Frameworks */,
1531+ >>>>>>> master
15281532 );
15291533 buildRules = (
15301534 );
16541658 shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-AsyncDisplayKitTests/Pods-AsyncDisplayKitTests-resources.sh\"\n";
16551659 showEnvVarsInLog = 0;
16561660 };
1661+ 5ADEA7587189397768F2B36C /* Embed Pods Frameworks */ = {
1662+ isa = PBXShellScriptBuildPhase;
1663+ buildActionMask = 2147483647;
1664+ files = (
1665+ );
1666+ inputPaths = (
1667+ );
1668+ name = "Embed Pods Frameworks";
1669+ outputPaths = (
1670+ );
1671+ runOnlyForDeploymentPostprocessing = 0;
1672+ shellPath = /bin/sh;
1673+ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-AsyncDisplayKitTests/Pods-AsyncDisplayKitTests-frameworks.sh\"\n";
1674+ showEnvVarsInLog = 0;
1675+ };
16571676/* End PBXShellScriptBuildPhase section */
16581677
16591678/* Begin PBXSourcesBuildPhase section */
Original file line number Diff line number Diff line change @@ -31,6 +31,17 @@ typedef enum : NSUInteger {
3131 */
3232@property (nonatomic , assign ) BOOL laysOutHorizontally;
3333
34+ /* * Horizontally align content (text or image).
35+ Defaults to ASAlignmentMiddle.
36+ */
37+ @property (nonatomic , assign ) ASHorizontalAlignment contentHorizontalAlignment;
38+
39+ /* * Vertically align content (text or image).
40+ Defaults to ASAlignmentCenter.
41+ */
42+ @property (nonatomic , assign ) ASVerticalAlignment contentVerticalAlignment;
43+
44+
3445- (NSAttributedString *)attributedTitleForState : (ASButtonState)state ;
3546- (void )setAttributedTitle : (NSAttributedString *)title forState : (ASButtonState)state ;
3647
Original file line number Diff line number Diff line change @@ -39,6 +39,9 @@ - (instancetype)init
3939 _titleNode = [[ASTextNode alloc ] init ];
4040 _imageNode = [[ASImageNode alloc ] init ];
4141
42+ _contentHorizontalAlignment = ASAlignmentMiddle;
43+ _contentVerticalAlignment = ASAlignmentCenter;
44+
4245 [self addSubnode: _titleNode];
4346 [self addSubnode: _imageNode];
4447
@@ -195,8 +198,8 @@ - (ASLayoutSpec *)layoutSpecThatFits:(ASSizeRange)constrainedSize
195198 ASStackLayoutSpec *stack = [[ASStackLayoutSpec alloc ] init ];
196199 stack.direction = self.laysOutHorizontally ? ASStackLayoutDirectionHorizontal : ASStackLayoutDirectionVertical;
197200 stack.spacing = self.contentSpacing ;
198- stack.justifyContent = ASStackLayoutJustifyContentCenter ;
199- stack.alignItems = ASStackLayoutAlignItemsCenter ;
201+ stack.horizontalAlignment = _contentHorizontalAlignment ;
202+ stack.verticalAlignment = _contentVerticalAlignment ;
200203
201204 NSMutableArray *children = [[NSMutableArray alloc ] initWithCapacity: 2 ];
202205 if (self.imageNode .image ) {
You can’t perform that action at this time.
0 commit comments