ddeville/DDPageControl

Is it possible to change width of the view?

Opened this issue · 4 comments

I am trying to change width of the control, to make it as wide as screen width:

DDPageControl *pageControl = [[DDPageControl alloc] init];
pageControl.numberOfPages = 4;
pageControl.currentPage = 0;
pageControl.indicatorDiameter = 5.0;
pageControl.frame = CGRectMake(0.0, 300.0, 320.0, 36.0);

This doesn't work for me, the width always equals to 100.0

How can I change this parameter?

Thanks.

I just hit this same issue... I want this control to be full-width so tapping on it will paginate prev/next. It's kind of useful to allow that.

My workaround was to remove the - (void)setFrame:(CGRect)aFrame and - (void)setBounds:(CGRect)aBounds in DDPageControl.m

This is the one issue that prevents DDPageControl from being a drop-in replacement. Indeed removing the two setters resolved the issue for me.

+1 for this. I'm not sure when having the control set it's own width might be useful, but it should be an opt-in anyway to allow for DDPageControl being a drop-in replacement on UIPageControl.

+1 for this. Are there some solution without changing the code to this issue?