views:

114

answers:

2

Hey guys, sure hope you can help me.

I've got around 50 Model-Classes stored in a seperate Folder (not only a group) and I really don't want to write an #import for each of these classes.

Is there a way to import a whole directory?

I know it's possible within other programming languaged and perhabs I simply used wrong syntax.

Plz help me! greets Infinite

+3  A: 

As a possible workaround you can import all of them in separate header(e.g. MyImports.h) and import only it whenever you need.

Vladimir
+7  A: 

#import is just a variant of #include. They don't allow to specify a whole directory.

You will have to specify each of your 50 header files.

You can generate that list with bash:

cd myfolder ; printf '#import "%s"\n' *.h > ../myheader.h
mouviciel
thx, worked great :)
Infinite