Search code examples
objective-cuicoloruipagecontrol

Objective c pagecontrol background color


I have a scrollview with a pagecontrol, when i change her color, my pagecontrol dissapear.

UIColor *col = [UIColor colorWithRed:14.5 green:35.6 blue:72.9 alpha:1];
        self.pageControl.backgroundColor = col;

Solution

  • UIColor *col = [UIColor colorWithRed:14.5 green:35.6 blue:72.9 alpha:1];

    If you have the RGB ASCII values 0 to 255

    you can specify it as

    UIColor *col = [UIColor colorWithRed:(255/255) green:(0/255) blue:(0/255) alpha:1]; // This represent Red color