如何停止枚举NSAttributedString的属性?

enumerateAttribute方法的文档中,关于块的stop参数,说:

该块可以将该值设置为true以停止对该集合的进一步处理。

但是,在块内stop参数是一个let我不能把它设置为true

在发现第一个属性发生之后,我需要停止枚举。 我怎么能这样做?

该参数是保存实际值的参考:

 let attributed: NSAttributedString = ... attributed.enumerateAttribute( NSFontAttributeName, in: NSRange(location: 0, length: attributed.length), options: [] ) { value, range, stop in stop.pointee = true } 

请参阅UnsafeMutablePointer的参考。