Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a place to put a category import statement so all classes see it?

I have an Objective-C category of UIColor that I would like to "import" everywhere in my project. But instead of using the #import to every class that needs it I was told there was a way to set it up so all classes can see it. Anyone know how this is accomplished?

Thanks in advance, Rob

like image 246
Rob Avatar asked Oct 11 '22 12:10

Rob


1 Answers

Add that import to the precompiled header file (*.pch) in your project - that way it will be imported to any implementation file automatically.

like image 173
Vladimir Avatar answered Oct 29 '22 23:10

Vladimir