Skip to content

Conversation

GeekTree0101
Copy link
Contributor

@GeekTree0101 GeekTree0101 commented Oct 31, 2020

It solves center alignment limitation on ASCornerLayoutSpec such as top/left/bottom/right

How to use

swift

let edgeSpec = ASEdgeLayoutSpec(child: baseNode, edge: edgeNode, location: .top)
edgeSpec.offset = 2.0

// or 

let edgeSpec2 = ASEdgeLayoutSpec(child: baseNode, edge: edgeNode, location: .top, offset: 2.0)

objective-c

ASEdgeLayoutSpec *edgeSpec = [ASEdgeLayoutSpec edgeLayoutSpecWithChild:baseNode
                                                                    edge:edgeNode
                                                                    location:ASEdgeLayoutLocationTop];
edgeSpec.offset = 2.0;

// or


ASEdgeLayoutSpec *edgeSpec = [ASEdgeLayoutSpec edgeLayoutSpecWithChild:baseNode
                                                                    edge:edgeNode
                                                                    location:ASEdgeLayoutLocationTop
                                                                    offset:2.0];

Screen shot

스크린샷 2020-10-31 오후 2 10 49

@CLAassistant
Copy link

CLAassistant commented Jan 31, 2021

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants