This is my first question and I feel like a fool not being able to find the answer since I strongly suspect something like this has already been answered, but my google-fu has failed me.
What I want to achieve is making a framework that I can add to my applications so I am able to access structs from every class I build. For example, CGRect can be accessed from any class that I build because (I think) every class includes the Foundation Framework, or when I create a view controller I am able to use UIButtons because they are located in the UIKit Framework, which subsequently pulls the Foundation Framework and the CoreGraphics Framework.
I want a file where I can stick structs or custom objects that I'll be interested in using over and over again. i.e. CGPoint from the CoreGraphics Framework:
struct CGPoint {
CGFloat x;
CGFloat y;
};
typedef struct CGPoint CGPoint;
I'd want a Framework where I could add stuff like a month typedef
typedef enum {
Jan = 1,
Feb = 2,
Mar = 3,
Apr = 4,
May = 5,
Jun = 6,
Jul = 7,
Aug = 8,
Sep = 9,
Oct = 10,
Nov = 11,
Dec = 12,
} SSMonth;
I think in C the way I'd accomplish this is by creating a header file and just including this header file in all of the other files which use the the above SSMonth example. Would it be better to achieve this goal a similar way for an iOS project, or would creating a Framework be the better method? Assuming I wanted to expand it beyond structs and typedefs and wanted to include actual classes; would the answer be the same?