Call a macro every time any method is called - Objective C

后端 未结 4 1243
情深已故
情深已故 2020-12-06 07:46

I wrote a debug macro that prints to the console the passed-in string whenever the global kDebug flag == YES.

I need to print out the name

4条回答
  •  萌比男神i
    2020-12-06 08:28

    sounds like you were looking for the __PRETTY_FUNCTION__ macro... but the accepted answer is probably a better way to go.

提交回复
热议问题