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

Вопрос

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?

Это было полезно?

Решение

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

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

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top