Thursday, May 23, 2024
HomeiOS Developmentios - warning: can not type key path that captures non-sendable sort...

ios – warning: can not type key path that captures non-sendable sort ‘KeyPath’


I’ve bought an AttributedString and I am making use of an orange shade and strikethrough to a portion of the string.

var attributedpricestring = AttributedString("(yearlyfullpricestring)n(yearlyrealpricestring)")
let vary = attributedpricestring.vary(of: yearlyfullpricestring)!
attributedpricestring[range].foregroundColor = UIColor(named: "color-orange-highlight")
attributedpricestring[range].strikethroughStyle = .single

This code works fantastic, however is abruptly producing the next warning:

warning: can not type key path that captures non-sendable sort 
'KeyPath<AttributeScopes.UIKitAttributes, AttributeScopes.UIKitAttributes.ForegroundColorAttribute>'

My challenge’s Swift Strict Concurrency Checking is about to Minimal, which I imagine implies that it ought to solely warn about non-sendable warnings.

Why is it warning a couple of key path drawback when making an attempt to use a mode to a variety of the AttributedString?



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments