In Objective C you can log the method that is being called using:
NSLog(@\"%s\", __PRETTY_FUNCTION__)
Usually this is used from a logging m
Starting from Swift 2.2 we should use:
From The Swift Programming Language (Swift 3.1) at page 894.
func specialLiterals() {
print("#file literal from file: \(#file)")
print("#function literal from function: \(#function)")
print("#line: \(#line) -> #column: \(#column)")
}
// Output:
// #file literal from file: My.playground
// #function literal from function: specialLiterals()
// #line: 10 -> #column: 42