1

I have my images, but how do I redraw the UIPageControl to use these images?

woody993
  • 639
  • 1
  • 11
  • 25

2 Answers2

4

The UIPageControl does not manage any views for you. It is a very basic control that just displays the dots. It is up to you to implement your 'page' views and navigate between them using 'swipe' gestures or however you want to do it.

See this tutorial for information on how to combine a UIPageControl with two UIViews to navigate between multiple pages.

(To directly address the title of your question - you do not subclass UIPageControl)

Robin Summerhill
  • 13,695
  • 3
  • 41
  • 37
  • 1
    I've decided to subclass a UIView and add UIImageViews to that, under which method do I call "[self addSubview..."? – woody993 Jan 07 '10 at 15:28
  • why are you saying 'you do not subclass UIPageControl'? If even the UIPageControl has texts indicating how to subclass it correctly: 'Discussion: Subclasses that customize the appearance...' in `sizeForNumberOfPages:` method http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIPageControl_Class/Reference/Reference.html – Felipe Sabino Jun 28 '11 at 15:40
  • I'm not saying that you can't subclass UIPageControl, I'm just saying that in this instance it is not necessary. The original poster misunderstood the purpose of UIPageControl and thought it was responsible for managing the views representing individual pages. UIPageControl just manages the 'dots' and if you don't want to modify the default appearance then you don't need to subclass it. – Robin Summerhill Jun 30 '11 at 19:54
1

See Swip from one view to the next view

Apple also has sample code you can use.

Community
  • 1
  • 1
Nimrod
  • 5,168
  • 1
  • 25
  • 39