Reputation: 1751
I have a timeline with entries of different types and I need a way to navigate a user to a specific interface controller (or the same controller but with a different context) depending on an entry type has been tapped. Is there any way to handle a tap on a complication under watchOS 2?
Upvotes: 3
Views: 615
Reputation: 3787
In you main interface controller, override handleUserActivity:(NSDictionary *) userInfo
like this:
-(void)handleUserActivity:(NSDictionary *)userInfo
{
NSDate* timelineDate = userInfo[CLKLaunchedTimelineEntryDateKey];
NSLog(@"%@", timelineDate);
}
You can know only the start date of the timeline entry, You can't figure out complication family(You mentioned it as entry type?) or other informations.
At least, You can figure out whether the app is launched by complication.
Upvotes: 6