What is the correct string specifier for _cmd?
Question
I use %s for _cmd, the latest XCode will generate an error "Format specifies type char * but the argument has type SEL". Checked documentation and couldn't find a clue. Anyone know the correct string specifier to use?
Solution
I've never done Apple programming in my life, so bear with me, but a little Googling revealed easily that:
- to convert
SEL
toNSString
useNSStringFromSelector
- Then use the
%@
format specifier on that.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow