Skip to content
This repository was archived by the owner on Apr 11, 2024. It is now read-only.

Fix missing attributes for UILabel when set attributedText in iOS 11#102

Merged
levinli303 merged 2 commits into
microsoft:masterfrom
alex7vecher:fix-label-attributed-text-ios11
Mar 31, 2021
Merged

Fix missing attributes for UILabel when set attributedText in iOS 11#102
levinli303 merged 2 commits into
microsoft:masterfrom
alex7vecher:fix-label-attributed-text-ios11

Conversation

@alex7vecher
Copy link
Copy Markdown
Contributor

  1. Use addAttribute instead of setAttributes to avoid losing other attributes besides .foregroundColor.
  2. If the .foregroundColor attribute is not specified in the NSAttributedString, should be used UILabel textColor. This is standard behavior. Otherwise, the color of the UILabel text does not change.

@icodesign icodesign requested review from levinli303 and li-bei March 31, 2021 05:02
Comment thread Sources/FluentDarkModeKit/Extensions/UILabel+DarkModeKit.swift Outdated
@levinli303
Copy link
Copy Markdown
Member

looks good, thanks for you contribution!

@levinli303 levinli303 merged commit 7d99226 into microsoft:master Mar 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants