-(ID) Initwithplayer: (Vvplayer *) Aplayer seatsnum: (int) seatsnum{if (self = [super init]) {NSLog (@ "\ n functio N:%s\n Pretty function:%s\n line:%d\n File:%s\n Object:%@ ", __func__, __pretty_function__, __line__, __file__, Aplayer ); }...}
__func__ __pretty_function__ __line__ __file__ are defined terms that are reserved by the system and are easy to use
There are also core foundation methods that can be used to get useful strings from the cfstring hierarchy, including and not limited to Selector, class, protocol, etc.
-(ID) Initwithplayer: (Vvplayer *) Aplayer seatsnum: (int) seatsnum{if (self = [super init]) {NSLog (@ ' current selector:%@ ', Nsstringfromselector (_cmd)); NSLog (@ "Object class:%@", Nsstringfromclass ([Self class])); NSLog (@ "Filename:%@", [[NSString stringwithutf8string:__file__] lastpathcomponent]); } ...}
iOS Debug with NSLog