I had this problem with import statements with my own classes using forward declarations to fix that. I have a method that uses type CTFramesetterRef. So I needed to add the CoreText framework. If I declare the method in my .h file, do I just
#import <CoreText/CoreText.h>
in my .h file and not my .m file. Are there any hard and fast rules for this? Sometimes I see code that has it in the .m, sometimes in the .h. To me it seems like what I see is declare it in the .m if you can, if you have to put it in the .h, put it there instead, and if you can use a forward declaration for a class, then do that. Just not sure what the proper way to do things are. Thanks.
“declare it in the .m if you can, if you have to put it in the .h, put it there instead, and if you can use a forward declaration for a class, then do that.” – I would say this is the proper way to do that.