wannabegeek / PageViewController

The Unlicense
111 stars 27 forks source link

Enhancement Request : dot color : Or a pointer as to how to implement #2

Closed wm-j-ray closed 12 years ago

wm-j-ray commented 12 years ago

Tom,

This control works flawlessly and I'm trying to figure out how to implement changing the dot color for selected and non-selected states.

Can you give me a pointer as to how to implement?

Thanx in Advance

wannabegeek commented 12 years ago

I don't think this is possible, there is nothing in the UIPageControl API to change the colour or apply a tint. As far as I can see, the only way of doing this is to implement your own UIPageControl (or subclass it and implement - (void)drawRect:(CGRect)rect

Hope that helps.

Thanks, Tom

On 20 Jun 2012, at 18:46, wm-j-ray wrote:

Tom,

This control works flawlessly and I'm trying to figure out how to implement changing the dot color for selected and non-selected states.

Can you give me a pointer as to how to implement?

Thanx in Advance


Reply to this email directly or view it on GitHub: https://github.com/wannabegeek/PageViewController/issues/2

wm-j-ray commented 12 years ago

I found a PageControl h/m and tried to plug it into StoryBoard in IB but couldn't get IB to take it.

I'm not sure how to do it programmatically.

On Jun 21, 2012, at 2:46 AM, Tom Fewsterreply@reply.github.com wrote:

I don't think this is possible, there is nothing in the UIPageControl API to change the colour or apply a tint. As far as I can see, the only way of doing this is to implement your own UIPageControl (or subclass it and implement - (void)drawRect:(CGRect)rect

Hope that helps.

Thanks, Tom

On 20 Jun 2012, at 18:46, wm-j-ray wrote:

Tom,

This control works flawlessly and I'm trying to figure out how to implement changing the dot color for selected and non-selected states.

Can you give me a pointer as to how to implement?

Thanx in Advance


Reply to this email directly or view it on GitHub: https://github.com/wannabegeek/PageViewController/issues/2


Reply to this email directly or view it on GitHub: https://github.com/wannabegeek/PageViewController/issues/2#issuecomment-6475348

wm-j-ray commented 12 years ago

Well, I got it to work by subclassing UIPageControl, eliminating the existing PageControl from the storyboard and creating it programatically using this implementation of PageControl : http://stackoverflow.com/questions/2942636/how-i-change-the-color-of-pagination-dots-of-uipagecontrol

A little 'hackie', but it works. Thanx for the help

wm-j-ray commented 12 years ago

I want to load a view controller other than self.childViewControllers objectAtIndex:0.

I'm struggling with how to do it. Can you get me started? Thanx in Advance