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

Added values for inset percentage content offsets #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ehlersd
Copy link

@ehlersd ehlersd commented Jun 12, 2017

Not sure if you want to merge this option into your repo or not. It was needed for our purposes to try to improve content centering, so I'd love to get it added to the main distribution, but if not, I understand.

Thanks for the code!

@ehlersd ehlersd changed the title Added values for insetLeftPercentage content offsets Added values for inset percentage content offsets Jun 12, 2017
@property (nonatomic) CGFloat insetLeftPercentage;
@property (nonatomic) CGFloat insetRightPercentage;
@property (nonatomic) CGFloat insetTopPercentage;
@property (nonatomic) CGFloat insetBottomPercentage;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are called inset but they seem to behave like outset? A positive value will push the image outwards.

Also, I'd prefer UIEdgeInsets as that's a standardized way to refer to paddings.
The way I would see this is the UIEdgeInsets would restrict the boundaries in which the alignment will happen.

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.

4 participants