I use native UIPageControl
in my objective-c application and I want to have a rectangular dots instead of circular one. I searched about that and for a library providing this but I didn’t found anything.
I tried to do it like this but it has no effect:
-(void)updateDotsFormat {
for (int i = 0; i < [self.pageControl.subviews count]; i++)
{
UIView* dot = [self.pageControl.subviews objectAtIndex:i];
UIView* dotView = [[UIView alloc] init];
dotView.backgroundColor = [UIColor blueColor];
CGRect frame = dotView.frame;
frame.size.width = 50;
frame.size.height = 20;
dotView.frame = frame;
[dot addSubview:dotView];
}
}
How can I set the dots format to rectangle?