Sorry I am still a bit new to swift. I have searched on here but all I could find are outdated answers. How do I construct the AttributedString.Index for insert(_ s: some AttributedStringProtocol, at index: AttributedString.Index)
.
I know I can just add them together but this is just a small piece of what I am actually working on.
func setFooterMessage() -> AttributedString {
var mOne = AttributedString("Play on ")
mOne.foregroundColor = .white
let mTwo = AttributedString("Monday")
mOne.insert(mTwo, at: 2) // error
return mOne
}