Skip to content
This repository was archived by the owner on Jun 4, 2025. It is now read-only.

Conversation

@mindgraffiti
Copy link
Contributor

@mindgraffiti mindgraffiti commented Jul 3, 2018

This PR removes the background image rendering method from FancyButton and adds it to the UIImage+Assets extension. It will be used in WordPressAuthenticator-iOS.

To Test

Change the WordPressUI pod to point to the new background image rendering extension branch pod 'WordPressUI', :git => 'https://github.com/wordpress-mobile/WordPressUI-iOS.git', :branch => 'feature/extension-render-bg-image'

This change helps support the implementation of a new feature in WordPressAuthenticator-iOS, NUXButton configurable using UIAppearance

cc: @jleandroperez

public static let backgroundShadowOffset = CGSize(width: 0, height: 1)
public static let backgroundShadowBlurRadius = CGFloat(0)
public static let contentInsets = UIEdgeInsets(top: 12, left: 20, bottom: 12, right: 20)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we perhaps move these metrics back to FancyButton?. Reasoning is: they're set this way, because of that's what FancyButton requires. (You can just remove the default parameter assignments from the API here, and just wire them in the FancyButton code)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed to DefaultRenderMetrics

Copy link
Contributor

@jleandroperez jleandroperez left a comment

Choose a reason for hiding this comment

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

:shipit:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants