Can you change the selected page in WatchKit PageView

不羁的心 提交于 2019-12-11 09:55:07

问题


Imagine I have 5 pages, If I'm on page 1 can I programmatically load page 5?

I'm aware of using becomeCurrentPage to load the initial page but not of how to switch it (if at all possible).


回答1:


You can send post an NSNotificaton whenever you want to switch and have your desired InterfaceController as an observer for this notification. And inside the selector of the observer. call [self beconmeCurrentPage]. It worked for me and i hope it works for you as well.



来源:https://stackoverflow.com/questions/29023986/can-you-change-the-selected-page-in-watchkit-pageview

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