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 string, mutableString methods #2
Conversation
Hi @muukii , thanks for the PR! I'm sorry I won't merge it but I'll do my best to explain why and I hope it'll make sense. The only "beef" I have with
I like the current way of creating an attributed string though. let base = TextAttributes()
// setterMethods
label.attributedText = NSAttributedString("hello", attributes: base)
let highlight = base.clone()
// setterMethods Thanks again! |
OK! |
@delba |
Awesome! Thank you 👍 Would you like me to add it in an |
Thank you! That's great. |
Could you create a PR please? Why using a closure though ? Why not your original idea of Thanks! |
OK, I'll create PR.
I thought better not add a method that ends method chaining, for API consistency.
When you need to pass in multiple lines of code, I think it looks better with {} than (). Particulary ending with many ) looks bad. |
Sorry, |
@delba Thanks! |
I wrote an extension of
TextAttributes
to enable creatingNSAttributedString
s directly, like this:It will be even more easier to create attributed strings.
How do you think?