I'm back on writing Objective-C code again and is trying to find the equivalent of Swift's inout parameter notation in Objective-C.
func swapTwoInts(_ a: inout Int, _ b: inout Int) {
let temporaryA = a
a = b
b = temporaryA
}
So far I've learned: 1.inout is not objc-compatible. 2.objc simply doesn't have language feature like this.
However, when I'm designing my API, I want it to be clear that this method is modifying its parameter. Is there any good way to accomplish this in Objective-C? Thank you!