Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you use groups in XCode?

I started using groups in Xcode the same way I use packages in Java or namespaces in C++, even though groups have no effect on the language.

Then I discovered Smart Groups and realised that it's sort of pointless to have my code neatly organised in "folders".

Do you use groups? If so, how and why?

like image 895
ruipacheco Avatar asked Oct 15 '09 10:10

ruipacheco


2 Answers

Groups are just an organisational tool, and you can use them in the way that is most logical to you.

Often developers will put their Model, View and Controller classes in separate groups. You might also want to put header files in their own group to reduce clutter.

I create a group for "utility" classes like categories, and a group for each main component of the application, for instance "Inspector" or "Preview". In those groups, the classes are further organised into Model, View and Controller groups.

It's up to you though, just do whatever feels natural.

like image 178
Rob Keniger Avatar answered Sep 26 '22 23:09

Rob Keniger


If you're using unit tests, these can go in their own group as well.

like image 28
Abizern Avatar answered Sep 26 '22 23:09

Abizern