After adding in the AVFoundation framework to my class this code breaks. Both lines where I get the position of the presentation layer of two views that are being animated with CAKeyFrameAnimation function fine and give no errors. As soon as I import the AVFoundation header into the source file they break and complain saying multiple methods named position found with mismatched result, parameter type, or attribute
.
I have no idea what it is about adding in this framework that breaks this code.
-(void)orbDistance {
CGPoint one = [[[self.orbOrange layer] presentationLayer] position];
CGPoint two = [self.orbGreen.layer.presentationLayer position];
CGFloat xDist = (two.x - one.x);
CGFloat yDist = (two.y - one.y);
CGFloat distance = sqrt((xDist * xDist) + (yDist * yDist));
NSLog(@"orange: %.0f", distance);
}