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

[Feature] Support an ASEdgeLayoutSpec #1933

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

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.

None yet

2 participants