1
votes

I have gone through the ADLivelyTableView demo project but have not been able to import the ADLivelyTableView h and m files into my project successfully. It appears that the main issue is to do with ARC. I have experimented by converting the demo project into arc, specifically but converting just the LDMasterView.m file, and this simply removes all references to releasing objects, and so after this conversion, the use ARC option under build settings is now ON and the app works. So i figured that the ADLivelyTableView .m and .h files dont need converting, but when these are imported into my project, i get all sorts of ARC errors for these two blocks of code:

 if (block != _transformBlock) {
        Block_release(_transformBlock);
        _transformBlock = Block_copy(block);
    }
}

and

@implementation ADLivelyTableView

- (void)dealloc {
    Block_release(_transformBlock);
    [super dealloc];
}

I dont get why these errors didnt show when turning on ARC in the demo project. id prefer finding a solution rather than trying to import my entire application to the demo project instead! The errors are as follows:

ARC Casting Rules: Cast of block pointer type 'ADLivelyTransform (aka NSTimeINterval (^)CALayer*_strong, float) to C pointer type 'const void *' required a bridged cast.
ARC Casting Rules: Cast of C Pointer ....(Same as above)

Also, once this issue is resolved, it is supposed to be as simple as just importing the ADLivelyTableView .h and .m files and then adding the line :

ADLivelyTableView * livelyTableView = (ADLivelyTableView *)self.tableView;
    livelyTableView.initialCellTransformBlock = ADLivelyTransformFan;

into my viewDidLoad section? or is that bit supposed to be edited for my specific table?

Thanks for your help, Regards, Rami

1

1 Answers

2
votes

You can modify the Compiler Flags for ADLivelyTableView.m.

Kindly try to add -fno-objc-arc.