_
means don't name that thing. It can be used in a number of places. In your case, it is saying ignore the variable being passed into the closure. The code you gave is ignoring all parameters but you can also just ignore some parameters.
in
is the start of the implementation of the closure. In your example code, the implementation of the closure is empty.
Overall, that line is defining a closure called "done" that takes an Optional NSError (NSError?
), NSData (NSData
), and Optional NSString (NSString?
) and returns nothing (-> ()
). The actual implementation of the closure does nothing.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…