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

Implement -alignmentRectInsets in all controls #12

Open
cacaodev opened this issue Sep 12, 2016 · 0 comments
Open

Implement -alignmentRectInsets in all controls #12

cacaodev opened this issue Sep 12, 2016 · 0 comments

Comments

@cacaodev
Copy link
Owner

@Property(nonatomic, readonly) NSEdgeInsets alignmentRectInsets;

The default value of this property is an NSEdgeInsets structure with zero values. Custom views that draw ornamentation around their content should use this property to return insets that align with the edges of the content, excluding the ornamentation. This allows the constraint-based layout system to align views based on their content, rather than just their frame.

Custom views whose content location can’t be expressed by a simple set of insets should override alignmentRectForFrame: and frameForAlignmentRect: to describe their custom transform between alignment rectangle and frame.

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

No branches or pull requests

1 participant