Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is not updated currentPage indicator on UIPageControl?

I am using the following code to update the currentPage indicator in my app:

pgcNotification.currentPage = 3;
pgcNotification.numberOfPages = 4;

Though, the indicator never changes and always stays in its first position.

like image 257
Javier Calatrava Llavería Avatar asked Mar 16 '23 21:03

Javier Calatrava Llavería


1 Answers

The problem is that you, firstly have to say the amount of pages and secondly the current page. Never in the other way around.

pgcNotification.numberOfPages = 4;
pgcNotification.currentPage = 3;
like image 165
Javier Calatrava Llavería Avatar answered Apr 02 '23 06:04

Javier Calatrava Llavería