carson-katri / carson-katri/AttributedStringBuilder

Cannot use 'font' modifier

Open
#1 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
23
Forks
3
PR merge metrics
No merged PRs in 30d

Description

Hey! Thank you for the library!
I tried to understand function builders following examples but stuck with some strange error when adding `font` modifier.

Here is all the code I have (it is a clean project, Xcode 10.3):
```
NSAttributedString {
"Hello "
.foregroundColor(.black)
// .font(UIFont.systemFont(ofSize: 10.0))
.background(.red)
.underline(.blue)
"World"
.foregroundColor(.green)
.underline(.orange, style: .thick)
}
```
If I comment "font" it compiles and all is good, but if I try ti uncomment I get the error:
Expression type 'NSAttributedString' is ambiguous without more context.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.