What does the arrow ( -> ) between two types mean in Swift?
It’s a function type. AnyObject -> Void
is the type of a function accepting AnyObject
and returning Void
.
success : AnyObject -> Void
This means that success parameter is a function that receives an object (AnyObject) and returns nothing (Void).