I have an app that uses Storyboard (not SwiftUI). Is there a way to define that a particular WKInterfaceButton should receive the "sent action" (as if the user tapped the button on screen) when the user uses the double-tap gesture with their fingers?
Post
Replies
Boosts
Views
Activity
I have a WKInterfaceLabel that spans two other objects (could be most anything, but generally solid color). (I'm using Interface Builder). One object is light and the other is dark. I'd like the part of the label on the light object to be black, and the part on the dark object to be white. See the example below.
Is there any way to "mask" out part of the label so that the objects behind show through? I could have two labels, one black and one white, but would need to mask out each half. I can't simply half cover each label to mask it out because that will mask out the other.
I'm not sure when it started (sometime before Xcode 15), but in Interface Builder, if I set the Height or Width to Relative to Container, the value I put in the numeric field displays as a rounded integer. In other words, if I set it to be 0.25, it displays as 0; if I set it to 0.75, it displays as 1. It does behave as the number I've entered. It's just frustrating when I'm trying to tweak my numbers and I have to write down what I've entered.
Is this a bug in Xcode, or is there some oddball setting that I may have inadvertently changed?
I have a WatchOS app that uses Push Navigation. I statrted to make a change this morning (Xcode 15.0, watchOS10), and discovered that the look of Push Navigation has changed dramatically. Instead of a back arrow "<" and title in the upper left corner, there is now a larger "<" in a dim circle, and the title is right-justified under the clock, with some background transparency. See attached image for a "old vs. new" comparison.
In several cases, this isn't a problem, but I have some scenes in my app that require just about every bit of real estate of the screen, and now the UI loses a significant amount of room at the top.
Does anyone know if there's a way to force the old behavior? If not, I may need to do some significant jiggering of my user interface!
I have an Apple Watch app (Swift), and I need to draw a UIImage with perspective, preferably into a new UIImage (see example below). The best way Apple provides is by performing a transform on UIView. Unfortunately, UIView is NOT available in WatchKit.
Does anyone know how this can be accomplished? I've been searching for weeks, but have not found a solution. CoreImage seems to have promise, but parts of it are not available in WatchKit.
I have a fairly simple WKInterfaceSCNScene in my Apple Watch app (the SCNScene contains only: camera, floor, cylinder). It runs a ~3-second animation. It works terrific on the simulator, but when I run it on my actual watch (series 7), it delays for about 6 seconds, then the animation displays properly.
Is the watch's processor so much slower than the simulator on my laptop? I could probably deal with a 0.5 second delay, but 6 seconds?
Thoughts?
I want to overlay one UIImage onto another to create a 3rd UIImage (think of it as a logo chosen at runtime placed on a background image) I will be using this combined UIImage as a material in SceneKit.
I've seen that it can be done on iOS using UIImageView, but that doesn't exist in WatchKit. Is there are way to do this in WatchKit? I've looked everywhere and can't find anything useful.
In my Watch app, I have a WKInterfaceTimer running. When the user taps in a WKInterfaceTextField and inputs some text (watch keyboard, or Scribble, or iPhone keyboard), it seems the timer is stopped, even when the user is done entering text. I want the timer to continue running the whole time.
Has anyone else seen this? Is there a way around it? I .start the timer when I get the text field's callback, but it doesn't seem to work consistently, plus the timer is stopped while the keyboard/scribble is showing.
My only alternative I can see is to perform the input somewhere else in the app, when the timer is not running (much less elegant).
Thoughts?
My Watch app uses WKInterfacePicker items in several places. I'm using Swift. As of WatchOS 9.0, their "focus" behavior is broken (it has behaved correctly for over two years). Nothing in the online documentation seems to indicate any change to the way focusing is supposed to work.
Calling mypicker.focus() no longer displays the green outline or caption. However, the item is focused because the crown scrolls the picker. Tapping the item does work to highlight the item. Scrolling the item using the crown (or touch screen) works, but the highlighting disappears.
Also, calling mypicker.resignFocus() doesn't always cause the item to lose focus; the crown still scrolls the list.
I have tried several Apple apps (like Alarms) that appear to have pickers where the focusing functions properly.
Nothing has changed in my code that has worked for years. The only thing that changed was updating my watch to WatchOS 9.0; and I verified that it doesn't work correctly in the current simulator, which is running WatchOS 9.0 also.
Any thoughts, folks?
In my watch app, I am using Push Navigation. On one screen, I have a timer running (among other things). When the user taps the Back button (chevron in the upper-left corner), I clean up the timer and UI and return to the previous screen.
What I'd like to do is: if the user taps the Back button while the timer is still running, I'd like to present an alert and offer Yes (end timer), and No (keep timer running and do not go Back). That would mean having the ability to tell WatchKit to abort going back.
I was able to do it by making the view be Full Screen (eliminating the Back button and title (I need the title!) and adding a button. Unfortunately, for smaller screen-size watches, I just can't afford the real estate.
My next thought is to leave the timer running (sloppy), and have the parent present the alert, and re-push into the timer screen if the user doesn't want thee timer to stop. Very messy.
Any thoughts would be greatly appreciated.
I have a Watch app that was created and on the app Store before the ability to set "Supports Running Without iOS App Installation". I'd love to get rid of the iOS stub altogether.
It appears the only way to have my Xcode project be truly Watch-only is to create a new project that is Watch-only. I am concerned that doing this will introduce a LOT of extra work, like:
Re-linking all the outlets (86) and actions (42) after adding all the old source files back in.
If the controls get new Object IDs, I'll have to update all the files with the translated controls (I have Dutch and German translations).
Also, will App Store Connect allow me to add a new version that is a truly Watch-only app?
Lots of concerns. I'm unsure if it's worth the effort. I appreciate any insights!
I am trying to add a Complication to my app using CLKComplicationTemplateGraphicCornerCircularImage. When I try to use my Complication, it shows as a smaller image and three dashes. I cannot get just the image.Also,the documentation for CLKComplicationTemplateGraphicCornerCircularImage says the image sizes are 64x64 and 72x72. Xcode has created an asset folder named "Complication" and for Graphic Circular it is limiting to 40x40 and 44x44.I feel like I'm missing something obvious. Any thoughts? TIAPertinent code: let template = CLKComplicationTemplateGraphicCornerCircularImage() guard let image = UIImage(named: "Graphic Corner") else { handler(nil); return} template.imageProvider = CLKFullColorImageProvider(fullColorImage: image) let timelineEntry = CLKComplicationTimelineEntry(date: Date(), complicationTemplate: template) handler(timelineEntry)