Reputation: 2914
i am working on animation app which requires animation in 3D, as normal animation we can do it via core animation/ quartz-core but i need 3D with anchor point animation.
can anyone suggest me any way? so i can catch the solution.
thanks
Upvotes: 1
Views: 194
Reputation: 917
-(void) ColorMonochrome
{ CIImage *result = [CIImage imageWithCGImage:[imageEdit.image CGImage]]; CIFilter *filter = [CIFilter filterWithName:@"CIColorMonochrome"];// 1 NSLog(@"%@",[CIFilter filterNamesInCategory:kCICategoryTileEffect]); [filter setDefaults]; // 2 [filter setValue:result forKey:@"inputImage"]; [filter setValue:[NSNumber numberWithFloat:1.0] forKey:@"inputIntensity"]; [filter setValue:[CIColor colorWithCGColor:[[UIColor greenColor] CGColor]] forKey:@"inputColor"]; result = [filter valueForKey:kCIOutputImageKey]; CIContext *context = [CIContext contextWithOptions:nil]; CGImageRef resultRef = [context createCGImage:result fromRect:[result extent]]; UIImage *resultimage = [UIImage imageWithCGImage:resultRef]; CGImageRelease(resultRef); imageEdit.image = resultimage; }
Upvotes: 0
Reputation: 917
Changing the anchorPoint of your view's layer affects the position necessarily. Here is the excellent explanation in response to this question.
Changing my CALayer's anchorPoint moves the view
Upvotes: 1