I am writing some Swift code and I would like to know the class of the object that called the function. I don\'t want to pass in any parameters. From within the function I w
Swift:
Add a (sender: Anyobject) as parameter to that function, and then print the sender (the function caller) like this:
(sender: Anyobject)
func yourFunc(sender: AnyObject){ print(sender) }
Or add a symbolic breakpoint with a po thread to see the stack trace of the caller of the method
po thread