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

Deprecation note for UIButton.setInsets(forContentPadding:imageTitlePadding:) #911

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

Conversation

roman-aliyev
Copy link
Contributor

Problem

UIButton.setInsets(forContentPadding:imageTitlePadding:) hides the warnings about UIButton.contentEdgeInsets and UIButton.titleEdgeInsets.

Impact of the change

All uses of the function will be highlighted by Xcode. The developer will be informed that the function includes the deprecated API.

@j-f1
Copy link
Contributor

j-f1 commented Jan 25, 2023

Per #783 (comment), these warnings are probably safe to ignore since none of the code is using the UIButton.Configuration API.

@roman-aliyev
Copy link
Contributor Author

roman-aliyev commented Jan 25, 2023

@j-f1 thanks for clarification.
But I noticed that the new api is already in use (see Scene/Onboarding/ConfirmEmail/MastodonConfirmEmailViewController.swift).
And I agree that this is safe, but it will be harder to migrate in the future if UIButton.setInsets is used frequently in the project.

@j-f1
Copy link
Contributor

j-f1 commented Jan 25, 2023

Good point, I guess it makes sense to leave the warnings in then!

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