Fortunately you're wrong. 😝
In order to create a customized navigation based app you have to:
1. Create a base Interface Controller and set its Identifier (for example "page")
2. Reload Root Controllers in parent Interface Controller:
- (void)willActivate {
// This method is called when watch view controller is about to be visible to user
[super willActivate];
// create pages controllers
NSMutableArray *controllersNames = [NSMutableArray arrayWithCapacity:pageCount];
NSMutableArray *controllersContexts = [NSMutableArray arrayWithCapacity:pageCount];
if (pageCount) {
for (uint8_t i = 0; i < pageCount; i++) {
[controllersNames addObject:@"page"];
[controllersContexts addObject:@[self, @(i)]];
}
}
else {
// no pages controller
[controllersNames addObject:@"nopage"];
[controllersContexts addObject:@[self, @(0)]];
}
// reload base controller
[WKInterfaceController reloadRootControllersWithNames:controllersNames contexts:controllersContexts];
}
You will pass page number as Context to identify your pages.
3. Then you can easily get page number from every loaded page in base Interface Controller's awakeWithContext:
- (void)awakeWithContext:(id)context {
[super awakeWithContext:context];
// set page ID
pageID = [[context objectAtIndex:1] unsignedIntValue];
}