I\'m very new to iPhone development. I want to create a application using FloodFill algorithm in iPhone. I\'m have no idea about FloodFill. Please Explain me the purpose of
This is a very curious question. Do you mean:
A "flood filled" polygon? Where polygon means anything from trivial polygons all the way up to a sophisticated Even / Odd rule arbitrary polygon filler (where polygon may be defined by Bézier curve paths)?
A "pick a point and flood fill" type algorithm? Sort of like the old "paint can" flood fill tool you see (well, at least you used to see, it's been a long time for me) in paint programs (I'm thinking MacPaint / Deluxe Paint era here). These algorithms range anywhere from the trivial 2D plane of pixels that "stop" when it hits an "edge" (usually a different "color" than the one where the flood fill started), all the way up to very sophisticated automagic edge detection algorithms you might see in high end paint / photo manipulation programs (i.e., PhotoShop).
I'm going to assume you're not looking for any of the trivial cases because... well, you've probably got some other nuts you need to crack before you try to crack this one.
So, in the case of #1, you should probably start by reading the documentation. Mac OS X / iOS has an extremely sophisticated 2D graphics API, largely based on the PDF / PostScript rendering model. CoreGraphics / Quartz will do "flood fill" for you automatically, and you can do it at the level of Bézier curves to boot.
In the case of #2, you should probably start by reading the exact same documentation. You're probably going to have to interact with it at this level anyways. However, OpenGL + programable shaders may be a better choice, depending on how sophisticated you want your "automagic" edge detection to be. But it's been my experience that people who are banging on the rendering pipe directly like this usually have a pretty good grasp of the fundamental algorithms used in manipulating pixel data, so I suspect this technique may not be appropriate for you.
Mixing CoreGraphics and OpenGL in the same context is a bit of an advanced technique, so you'll probably have to pick either CoreGraphics or OpenGL as your primary rendering API. However, CoreGraphics also has some pretty advanced and snazzy API's for doing the same type of stuff, but that gets way beyond your basic CoreGraphics API usage (but you'll find all the info by going through the various iOS graphics documentation, which is both extensive and very well documented).