问题
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