A collection of example source codes for c/c++ and ios and android platform. It also includes objective c.
Friday, May 6, 2011
Getting current method name in objective C
Following code fragments shows some useful tips of NSLog method. __PRETTY_FUNCTION__ identifier is used to get current method name.
You can display hexa values using NSLog method with %x formatter.
NSLog(@"Hex value: 0x%08x", 0x1234);
You can evenget current method name in execution using NSLog method.