I've been happily compiling and going my merry way with Xcode 4.3.2 (IOS5.1). Now that I've taken the plunge and decided to move to Xcode 4.5 my App fails compilation in a most miserable manner. Now, I've not got past the issue with ARMV7 or anything like that yet. No. My issue is probably going to make many of you groan.
But you can blame my basic ANSI C days for that. Everyone likes reusable code and I've created lots of it. BUT!!! I've not made any of this particular code into object(s) per se. That is, I've not taken the steps of the Interface and Implementation to heart.
Sure, I have my classes for my view controllers etc. But, to save having to declare and alloc *init* objects so I can use the methods therein, I've simply dumped a load of methods into a .inc file - in other words an include file. E.g, I'd have a method for altering the background colour or background image a of a table cell - and I'd import the file that had the method that did it.
E.g.
-(void)defaultInactiveBackGroundForCell:(UITableViewCell *)cell {
cell.backgroundView = [[UIImageView alloc] initWithImage:[[UIImage imageNamed:DEFAULT_INACT_CELL_BACKGROUND_IMAGE] stretchableImageWithLeftCapWidth:0.0 topCapHeight:5.0]];
} // defaultInactiveBackGroundForCell
All well and good so far.
And, I'd #import the file (containing the above code) at the top of my class file, my .m file. In my willDisplayCell delegate method, i'd simply call the following method:
[self defaultInactiveBackGroundForCell:cell];
And it'd work.
But under Xcode 4.5 it's kicking off big time:
Missing contact for method in declaration.
So, my question is: Is there any way at all of #importing code into a class .m fill like we used to do in the old days with ANSI C?
Help ?