This page view controller works but I can't see the page dots?(project zip attached)

Discussion in 'iOS Programming' started by whitedragon101, Jun 28, 2014.

  1. whitedragon101, Jun 28, 2014
    Last edited: Jun 28, 2014

    whitedragon101 macrumors 6502a

    Joined:
    Sep 11, 2008
    #1
    I have followed a page view controller tutorial I have even downloaded the full project they give you as a sample however when I follow it exactly I can not see the page dots in my project. I have even copied and pasted the tutorial code into my files and also copied and pasted the storyboard viewcontrollers to my project. Still no dots.

    Please could you have a look at the attached project file and see if you can figure out what the difference is between my version and the original so I can see the page indicator dots.

    (I am viewing both on the iphone 4inch simulator)

    My project
    https://www.dropbox.com/s/p25st8o6zx1u0nj/testScroll.zip
    The tutorial sample code (this does show the page dots)
    https://www.dropbox.com/s/wvb7wp826x9qs9r/PageViewDemo.zip

    Many thanks
     
  2. Ubuntu macrumors 68000

    Ubuntu

    Joined:
    Jul 3, 2005
    Location:
    UK/US
    #2
    It's there, it's just that it's white on a white background, whereas in the demo project it's being tinted so that it shows, using the following code in the app delegate:

    Code:
        UIPageControl *pageControl = [UIPageControl appearance];
        pageControl.pageIndicatorTintColor = [UIColor lightGrayColor];
        pageControl.currentPageIndicatorTintColor = [UIColor blackColor];
        pageControl.backgroundColor = [UIColor whiteColor];
    
    This will cause UIPageControls in the app to be darker and thus show up against light backgrounds.
     
  3. whitedragon101 thread starter macrumors 6502a

    Joined:
    Sep 11, 2008
    #3
    Thats awesome thank you so much! :)
     
  4. Ubuntu macrumors 68000

    Ubuntu

    Joined:
    Jul 3, 2005
    Location:
    UK/US
    #4
    No problem. :)
     

Share This Page