Copy Folllowing file in your project LinkedListStack.h LinkedListStack.m UIImage+FloodFill.h UIImage+FloodFill.m UIImage+FloodFill.hfile where you want to use this . Call flood fill function with all argument like folloeing UIImage *image1 = [self.image floodFillFromPoint:tpoint withColor:[...