Class UIPageControl

A UIPageControl is a row of dots giving sequential (not random) access to page numbers. Allow 16 pixels (or 16 pairs of pixels on iPhone 4) horizontally for each dot.

The numberOfPages and the currentPage are NSIntegers, probably the same as an int. The page numbers start at zero, so we add 1 to them in drawRect: before we print them.

Source code in PageControl.zip

  1. main.m
  2. Class PageControlAppDelegate
  3. Class View