Quick tip: Import necessary classes in a single file

When we working on a project and it has lot of class where doing same job we don’t need to import these classes again and again. Instead we need to a model class. Declare these classes in a single model class and use this class when necessary.

UserModel.h – Implementation file

#import "UserInformation.h"
#import "UserProducts.h"
#import "UserFriendList.h"

After that we should declare this model in our “Prefix” file.

#ifdef __OBJC__
     #import "UserModel.h"
#endif
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s