About Page control

Discussion in 'iOS Programming' started by iphonejudy, Aug 6, 2009.

  1. iphonejudy macrumors 6502

    iphonejudy

    Joined:
    Sep 12, 2008
    #1
    I used the below code for creating page control


    Code:
    CGRect frame = CGRectMake(0.0, 0.0, 200.0, 40.0);
    UIPageControl *pageControl = [[UIPageControl alloc] initWithFrame:frame];
    [pageControl addTarget:self action:@selector(action:) forControlEvents:UIControlEventTouchUpInside];
    [pageControl setBackgroundColor:[UIColor clearColor]];
    pageControl.numberOfPages = 10;
    
    But the control is not visible in run time.

    I designed it in design time also.It didnt visible.

    Can anyone tel the solution please?
     
  2. iphonejudy thread starter macrumors 6502

    iphonejudy

    Joined:
    Sep 12, 2008
    #2
    I solved it by,

    Code:
    pagecontrol.backgroundColor = [UIColor grayColor];
     

Share This Page