Question

I tried following this tutorial from the author's github repository, but unsuccessfully. When I try to build the project I get 6 errors.

5 of them are

Use of undeclared identifier '_accessibleElements'

and 1 of them is

Receiver type 'TKCalendarMonthTiles' for instance message does not declare a method with selector 'rectForCellAtIndex'

All errors are reported inside TKCalendarMonthView.m file

Was it helpful?

Solution

It appears the class TKCalendarMonthTiles declares a property:

@property (nonatomic, strong) NSMutableArray *accessibleElements;

which is not synthesized in the class implementation. Since no _accessibleElements ivar is declared, then you get the undeclared identifier error that you mention.

For this error, you can either build on Xcode 4.4 to autosynthesize declared properties, or add:

@synthesize accessibleElements = _accessibleElements

in the TKCalendarMonthTiles implementation

Now, for your second error. This is also due to building on Xcode 4.2 instead of 4.4. As of 4.4 (or maybe 4.3, I can't recall) you do not need to declare private methods in a class extension. But since you are building with Xcode 4.2, you will need to add the method declaration to a class extension on TKCalendarMonthTiles

@interface TKCalendarMonthTiles ()
- (CGRect)rectForCellAtIndex:(int)index;
@end

OTHER TIPS

I also had this same problem. I worked on it forever, gave up. Upgraded to xCode 4.5 and voila. It worked. Wish I would have seen this forum back then. Thanks peeps

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top