Skip to content

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