What is the correct string specifier for _cmd?
Domanda
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?
Soluzione
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.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow