views:

58

answers:

1

I always try to keep my Xcode projects very well organized but I recently asked myself where to put struct data types.

Normal I use a lot of classes even when a struct would do. Since classes are always separate files there are much easier to organize and easier to find.

Where do you put your structs?

+4  A: 

I try to follow the patterns employed by the system as much as possible. In particular, look to the definitions of NSRect, NSPoint, and other structures.

In other words, group together structures that are related into a single header file. For many projects, that would lead to exactly one header full of structure declarations.

bbum