UIPageControl ne répondent pas à toucher, ne change pas de point

J'ai un UIPageControl. Quand je clique sur un point pour changer de page, rien ne se passe. Deuxième point n'obtient pas mis en évidence.

Il fonctionne très bien, cependant, quand je scroll mon UIScrollView. Dans ce cas, le deuxième point est mis en évidence.

pageControl = [[UIPageControl alloc] init] ;
pageControl.center = CGPointMake(160.0f, 430.0f);
pageControl.numberOfPages=nPages;
pageControl.currentPage=0;
pageControl.hidesForSinglePage = YES;
pageControl.userInteractionEnabled =YES;

[pageControl addTarget:self action:@selector(pageTurn:) forControlEvents:UIControlEventValueChanged];

[self.view addSubview:pageControl];

Ce doit être appelée lorsque je de changement de contrôle pagecontrol Valeur, mais il n'est pas appelé car il ne répond pas au toucher.

- (void) pageTurn: (UIPageControl *) aPageControl
{
    int whichPage = aPageControl.currentPage;
    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationDuration:0.3f];
    [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
    sv.contentOffset = CGPointMake(320.0f * whichPage, 0.0f);
    [UIView commitAnimations];
}
InformationsquelleAutor Alex L | 2010-11-11