0
나는 3 개의 이미지로 PageControl을 만들어야하는 프로젝트를하고있다. 그것은 woking이지만 페이지의 이미지는 세 개의 작은 원이 첫 번째 이미지에만 나타납니다. 내가 뭘 잘못하고있어?페이지 컨트롤 버튼
[scrollView setScrollEnabled:YES];
CGRect frame;
frame.size = self.scrollView.frame.size;
//INICIO SCROLLVIEW DE FOTOS
//Fotos ---------
NSArray *imagens = [NSArray arrayWithObjects:@"foto1.png",@"foto1.png",@"foto1.png", nil];
//Fotos ---------
for (int i = 0; i < imagens.count; i++) {
CGRect frame;
frame.origin.x = self.listaFotos.frame.size.width * i;
frame.origin.y = 0;
frame.size = self.listaFotos.frame.size;
//Imagem
frame.origin.y = 0;
frame.size = CGSizeMake(491, 330);
UIImage *image = [UIImage imageNamed:[imagens objectAtIndex:i]];
UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
imageView.frame = frame;
[self.listaFotos addSubview:imageView];
frame.origin.x = self.listaFotos.frame.size.width * i;
}
self.listaFotos.contentSize = CGSizeMake(self.listaFotos.frame.size.width * imagens.count, self.listaFotos.frame.size.height);
self.pageControl.currentPage = 0;
self.pageControl.numberOfPages = imagens.count;