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

Support text sticker line break #32

Merged
merged 2 commits into from
Oct 26, 2022

Conversation

darquro
Copy link
Contributor

@darquro darquro commented Oct 22, 2022

Hi @longitachi,

My app's customer requests input line break on text sticker.
So I added new configuration textStickerCanLineBreak.

I'm appreciate if you would review this proposal.

Thank you.

@@ -213,7 +214,7 @@ extension ZLInputTextViewController: UICollectionViewDelegate, UICollectionViewD

extension ZLInputTextViewController: UITextViewDelegate {
func textView(_ textView: UITextView, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool {
if text == "\n" {
if !ZLImageEditorConfiguration.default().textStickerCanLineBreak && text == "\n" {
Copy link
Owner

Choose a reason for hiding this comment

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

I think the newlines of the text should be trimmed before the callback in the doneBtnClick method.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@longitachi Thanks all for the lighting fast response! I fixed that in the doneBtnClick by textView.text = textView.text.trimmingCharacters(in: .whitespacesAndNewlines).

@longitachi longitachi merged commit 2c5dad4 into longitachi:main Oct 26, 2022
@darquro darquro deleted the text_sticker_line_break branch October 26, 2022 04:04
@darquro
Copy link
Contributor Author

darquro commented Oct 26, 2022

@longitachi Thank you for your review and merge. Can I create a pull request for bump up version to 1.1.5?

@longitachi
Copy link
Owner

@darquro I will release v1.1.5 later.

@longitachi
Copy link
Owner

Done.

@darquro
Copy link
Contributor Author

darquro commented Oct 27, 2022

@longitachi Thank you!

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.

2 participants