iOS - Is it possible to make a macro globally available without importing the file in which it is defined every time? [duplicate]

StackOverflow https://stackoverflow.com/questions/23512506

Pergunta

I want to define a logging macro that I can use in all my source files, but I don't want to import the file in which I defined the macro every time? So, I am just curios whether it is possible to make a macro globally available without importing the file in which it is defined every time?

Foi útil?

Solução

Declare the macro in the #ifdef __OBJC__ section of your AppName-Prefix.pch.

Source How to define a macro globally in Objective-C?

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top