Why is not updated currentPage indicator on UIPageControl?

删除回忆录丶 提交于 2019-12-14 01:33:48

问题


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.


回答1:


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;


来源:https://stackoverflow.com/questions/28783361/why-is-not-updated-currentpage-indicator-on-uipagecontrol

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!