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

add new property to judge HUD contentView space to HUD elements #460

Closed
wants to merge 2 commits into from

Conversation

ws00801526
Copy link

  1. add contentInsets to fix HUD contentView to HUD elements(label, detail,Label, or custom views)
    margin will only determine the space between HUD edge to HUD contentView

…lLabel, or custom views)

margin will only determine the space between HUD edge to HUD contentView
Copy link
Collaborator

@matej matej left a comment

Choose a reason for hiding this comment

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

While I like the idea and it's more flexible than the previous implementation, it's a breaking change in behavior.

It would need to be written in a way where the insets would default to UIEdgeInsetsMake(margin, margin, margin, margin); and would only change if somebody sets them explicitly to keep compatibility with the current behavior.

Perhaps something we should rather do during a major release.

@@ -232,11 +232,21 @@ NS_ASSUME_NONNULL_BEGIN
@property (assign, nonatomic) CGPoint offset UI_APPEARANCE_SELECTOR;

/**
* The amount of space between the HUD edge and the HUD elements (labels, indicators or custom views).
* The amount of space between the HUD edge and the HUD contentView.
* This also represents the minimum bezel distance to the edge of the HUD view.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This also represents the minimum bezel distance to the edge of the HUD view.

Only this part seems to still hold. Not the first sentence.


/**
* The amount of space between the HUD contentView and the HUD elements (labels, indicators or custom views).
* This also represents the minimum bezel distance to the edge of the HUD view.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does it? Looks to me like this is still the margin?

* This also represents the minimum bezel distance to the edge of the HUD view.
* Defaults to 20.f
*/
@property (assign, nonatomic) CGFloat margin UI_APPEARANCE_SELECTOR;
@property (assign, nonatomic) CGFloat margin;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why remove UI_APPEARANCE_SELECTOR.

@matej matej closed this Nov 4, 2018
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