Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
CustomPageControl.xcodeproj
CustomPageControl
README.md
SampleImage.png

README.md

Customize your PageControl just like ViewPagerIndicator

screenshot

Intrudoction

This project shows you how to use SMPageControl to customize page control just like ViewPagerIndicator in android.

Concept

Custom page dot with rect image.

Code

    // create dot image
    UIImage* currentPageIndicatorImage = [UIImage imageWithRect:CGRectMake(0, 0, indicatorWith, VIEWS_PAGE_CONTROL_HEIGHT)
                                                          color:[UIColor hexARGB:0xFFFF6666]];

    UIImage* pageIndicatorImage = [UIImage imageWithRect:CGRectMake(0, 0, indicatorWith, VIEWS_PAGE_CONTROL_HEIGHT)
                                                   color:[UIColor hexARGB:0xFF333333]];

    // set custom image                                                   
    [self.pageControl setCurrentPageIndicatorImage:currentPageIndicatorImage];
    [self.pageControl setPageIndicatorImage:pageIndicatorImage];

Requirements

  • iOS >= 5.0
  • ARC

View the original post