I want to #import my custom class in “ProjectName”-Prefix.pch file in Xcode project.
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#import "CustomClass.h"
#endif
But, I won’t use my custom class in every project file, so I want to know, will it somehow hurt to my app performance or something else?
Is there any problem with that?
Is it not recommended?
#importensures that a given header file is only ever actually included once, so there’ll be performance issue. From Apple’s documentation:From Learning Objective C: A Primer