/EMPageControl

UIControl for iOS that allows for custom images instead of those tiny light gray dots that fit poorly on light gray backgrounds. Yeah, you've probably been there....

Primary LanguageObjective-C

EMPageControl

UIControl for iOS that allows for custom images instead of those tiny light gray dots that fit poorly on light gray backgrounds. Yeah, you've probably been there....

sample

While not an actual UIPageControl, the behaviour is almost exactly the same. EMPageControl can implement optional delegate calls to help facilitate the look and behavior. Both are optional:

imageForPage asks for a UIIMage to represent the page and state(selected || not selected)

-(UIImage*)emPageControl:(id)pageControl imageForPage:(NSInteger)pageNumber selected:(BOOL)isSelected;

sizeForPage asks for the appropriate size of a given pageControl marker in its state (selected || not selected)

-(CGSize)emPageControl:(id)pageControl sizeForPage:(NSInteger)pageNumber selected:(BOOL)isSelected;

Optionally, one can simply declare UIImages for properites selectedImage/unselectedImage if the images are consistent(same) across the control.

Use a standard addTarget:action:forControlEvents: for touch events. See the demo.

####Defaults EMPageControl will draw standard lightGray/darkGray pageControl markers if no delegate or selectedImage/unselectedImage is declared

if -(CGSize)emPageControl:(id)pageControl sizeForPage:(NSInteger)pageNumber selected:(BOOL)isSelected; is not implemented, CGSize of {5,5} is assumed.