-
Notifications
You must be signed in to change notification settings - Fork 72
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
Adds Javascript API to customize the font picker #363
Conversation
799b33e
to
39a5970
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Just a question about the custom subclass override.
// We use a subclassed font picker view controller to customize it. | ||
[view.pdfController updateConfigurationWithoutReloadingWithBuilder:^(PSPDFConfigurationBuilder * _Nonnull builder) { | ||
[builder overrideClass:PSPDFFontPickerViewController.class withClass:CustomFontPickerViewController.class]; | ||
}]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we always use the custom override, so we don't need to update the configuration all the time one of these properties is set, and just fallback to the default behavior, when none of these variables are set?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! 👍 Addressed in cc92d1a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Android part looks good 👍
Solves #320
Details
Adds Javascript API to customize the font picker.
The exposed React Native props:
Acceptance Criteria
package.json
,package-lock.json
,samples/Catalog/package.json
, andsamples/NativeCatalog/package.json
(see example commit: 1bf805f).