Questions tagged [wkinterfacecontroller]

wkinterfacecontroller is the main interface element use when building watchos apps, similar to the ViewController.swift file created in XCode when you create a new ios or macos project.

67 questions
2
votes
1 answer

Passing Data between Interface Controllers on Xcode 8.0 Swift 3.0

I want to pass a string between two Interface Controllers. On InterfaceController1 I want to create a variable like: var level:String = ("easy") and then be able to access that variable on InterfaceController2. I would prefer not to use global…
user7054537
2
votes
2 answers

WatchKit InterfaceController conditionally play haptic in sendMessage:replyHandler:

I want to make the interface controller check to make sure it is still in the foreground when I get a reply from the phone. If it is, perform a haptic to let the user know it finished working. sendMessage:replyHandler: is what I am using to…
Charlie
  • 1,279
  • 2
  • 12
  • 28
2
votes
1 answer

How to know when user has closed modally presented controller by tapping on title?

Is there a way to know in code when user has closed a modal by tapping the title? Apple's documentation states: The title of the modal interface is set to the string Cancel unless the presented interface controller explicitly changes it using the…
juhan_h
  • 3,965
  • 4
  • 29
  • 35
2
votes
0 answers

WatchKit: modal controller with it's own hierarchical navigation

Watchkit offers 3 types of navigation: Page-based, modal and hierarchical interfaces. Imagine that kind of hierarchy: Main controller V1 -> Modal controller V2 -> Push to controller V3 The main issue I'm facing: how to push V3 controller from the…
Edvardas
  • 586
  • 1
  • 4
  • 10
2
votes
0 answers

watchOS 2 - Replace visible controllers

I'm working on an app for watchOS 2 with a paged based navigation. However, I'd like to set some of the controllers dynamically. I know I could call the following: WKInterfaceController.reloadRootControllersWithNames(names, contexts: contexts) That…
Alex
  • 2,398
  • 1
  • 16
  • 30
2
votes
0 answers

Splash screen for watchkit in swift

I would like to implement a splash screen for my watch application. After a long check, i haven come to realize there is not a way as for phone and tablet such launchscreen.xib or launch image in info.plist for watch To implement splash screen, i…
Alp
  • 1,863
  • 1
  • 20
  • 38
2
votes
1 answer

Is there any way to change WKPickerItem title's font size

Is there any way to change WKPickerItem title's font size.How to change it's title's font size.
Kevin Su
  • 33
  • 1
  • 5
2
votes
1 answer

WatchKit: call popToRootController after user tap on back (cancel) upper-left corner button

I have 3 WKInterfaceController (A,B,C) and hierarchical navigation. So user goes: A->B->C. Then user can tap the upper-left corner of the screen or performs a left-edge swipe and by default he will go C->B->A. But I want to skip B and use…
mobiledev Alex
  • 2,228
  • 2
  • 28
  • 30
2
votes
2 answers

Can an Apple Watch app have multiple glances?

The question is as simple as: Can an Apple Watch app have multiple glances? I tried to put multiple glances in the Xcode storyboard but Xcode said that only one Glance is allowed for each app. Reason I am asking this is that I would like to change…
mm24
  • 9,280
  • 12
  • 75
  • 170
1
vote
1 answer

WatchOS set title action

When only a single interface is shown, is it possible to set an action when the top title is tapped? image
1
vote
0 answers

How to get Apple Watch display radius?

Is there some way to get the display radius? I tried to use contentSafeAreaInsets but they are 0 inside willActivate() and awake(withContext:) which is very frustrating.
kelin
  • 11,323
  • 6
  • 67
  • 104
1
vote
0 answers

WatchKit interfaceController not found

When running my App I get an error that an interface controller was not found, which crashes the app in runtime. AppNameWatchExtension[809:615971] [default] -[SPRemoteInterface _interfaceControllerWithID:]:2087: ComF: interfaceController for…
Lukas Köhl
  • 1,569
  • 2
  • 15
  • 28
1
vote
1 answer

How do I dismiss a WKInterfaceController that was presented with contextForSegue?

I have a WKInterfaceController with a WKInterfaceTable that lists some events a user has recorded in my app. A user can tap a row of the table to see more details about that event. To accomplish this, I've overridden…
gohnjanotis
  • 6,513
  • 6
  • 37
  • 57
1
vote
0 answers

Scroll only WKInterfaceTable - WatchKit

I have this situation: one WKInterfaceController within an WKInterfaceTable and a Group within one label. I want to do this: insert the group and below it the table but only table has to scroll and the group must be in the top of the…
1
vote
1 answer

How come Xcode Stops letting me hook up IBOutlets after two Interface Controllers?

I was setting the IBOutlets for the first few objects of a Watch App. However, after doing a few IBOutlets it stops once I get to work on the third InterfaceController, closes InterfaceController.Swift, and instead opens WKInterfaceController.h. It…