In the documentation of the enumerateAttribute
method it is said, regarding the stop
argument of the block, that:
The block
The parameter is a reference that holds the actual value:
let attributed: NSAttributedString = ...
attributed.enumerateAttribute(
NSFontAttributeName,
in: NSRange(location: 0, length: attributed.length),
options: []
) { value, range, stop in
stop.pointee = true
}
See the reference for UnsafeMutablePointer.