What is the use of -
func perform(_ aSelector: Selector!) -> unmanaged<AnyObject>!
in iOS?
- To call a method of a class?
- To add a selector method?
- To add a class delegate?
- To define a class? (I doubt it's this)
I was originally thinking that it it was to add a selector method, but after looking at it some more I think it may be "to call a method of a class." Selectors are used for target/action paradigms where I kick something off and when the event fires or finishes then it wants to fire off some kind of action method. In this example do I pass it a parameter of a selector function then at the end of this "perform" function, I am returning an unmanaged object of any type? Does that even make sense?
Thanks!