I would like to NSLog the current class file that the simulator loads, in order to make sure the class file loaded currently. What parameter should I code?
Is it possible?
Thanks.
I would like to NSLog the current class file that the simulator loads, in order to make sure the class file loaded currently. What parameter should I code?
Is it possible?
Thanks.
Copyright © 2021 Jogjafile Inc.
You can use the preprocessor directive
__FILE__to access the file path of the currently executing code. This flag is set at compile-time, but for usage in anNSLog, this shouldn't matter.You can use it like this:
There are also other preprocessor variables you can use, such as
__LINE__and__PRETTY_FUNCTION__You can define it in a preprocessor macro, and use it as such: