You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When migrate my project to TextAttributes I noticed problem and wrote patch for it that is TextAttributes reset paragraphStyle configured by storyboard even if not changed paragraphStyle parameter.
// `@IBOutlet weak var label: UILabel!` is configured to center alignment via storyboard.// Native: label is aligned to Center.letattributedString=NSMutableAttributedString(string:"text")
attributedString.addAttribute(NSBaselineOffsetAttributeName, value:8, range:NSRange(location:0, length:4))
label.attributedText = attributedString
// TextAttributes: label is aligned to Left.letattributedString=NSMutableAttributedString(string:"text")letattrs=TextAttributes().baselineOffset(8)
attributedString.addAttributes(attrs)
label.attributedText = attributedString
Is this bug or feature?
My workaround patch is this, but this patch break current TextAttributes behavior. r-plus@680cf07
P.S. I preferred current simply architecture. We should add .alignment(.Center) chain explicitly.
The text was updated successfully, but these errors were encountered:
Hey @r-plus, I'm closing this issue. Let's say that TextAttributes doesn't play well with IB/Storyboard ;)
If we try to support this edge case, I bet it will be an endless task 😃
Hi.
When migrate my project to TextAttributes I noticed problem and wrote patch for it that is
TextAttributes
reset paragraphStyle configured by storyboard even if not changed paragraphStyle parameter.Is this bug or feature?
My workaround patch is this, but this patch break current TextAttributes behavior.
r-plus@680cf07
P.S. I preferred current simply architecture. We should add
.alignment(.Center)
chain explicitly.The text was updated successfully, but these errors were encountered: