Post

Replies

Boosts

Views

Activity

Comment on How can I make my multi-window Catalyst app restore window size and position after closing with stoplight button?
I read through those docs and tried the sample app, but it's all about restoring view controller state. That already works - I can open various windows, quit the app, relaunch it, and they come back as they were, via NSUserActivity. My question is about how to make macOS understand that for one particular window type (meaning one particular UISceneConfiguration), when the window is closed using the stoplight button and reopened, it should be restored, not recreated from scratch.
Topic: UI Frameworks SubTopic: UIKit Tags:
Oct ’24
Comment on What is ChronoKit.InteractiveWidgetActionRunner.Errors Code 1?
Also, widgetUrl does not appear to work. I tweaked my sample app code to: Make LaunchAppIntent inherit from AppIntent and have a perform method that just returns .result() Add .widgetURL(URL(string: "otcontrolwidget://test")!) on the Image` in the control itself And tapping the control now does nothing. I'm using .widgetUrl on other widgets, but it doesn't appear to work with Control Center widget buttons.
Topic: UI Frameworks SubTopic: UIKit Tags:
Sep ’24
Comment on How can I make my multi-window Catalyst app restore window size and position after closing with stoplight button?
Setting the restorationIdentifier property of that scene's window or its root view controller does not appear to do anything.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Oct ’24
Comment on How can I make my multi-window Catalyst app restore window size and position after closing with stoplight button?
I read through those docs and tried the sample app, but it's all about restoring view controller state. That already works - I can open various windows, quit the app, relaunch it, and they come back as they were, via NSUserActivity. My question is about how to make macOS understand that for one particular window type (meaning one particular UISceneConfiguration), when the window is closed using the stoplight button and reopened, it should be restored, not recreated from scratch.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Oct ’24
Comment on How can I get a tab-bar styled ornament on the trailing edge of a view controller?
This looks great! But the trailing ornament really seems to want to give itself a large corner radius - seemingly half its with, so that its top edge is always rounded. How do I get it to accept a rounded-rectangle shape like UITabBar uses?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Oct ’24
Comment on What is ChronoKit.InteractiveWidgetActionRunner.Errors Code 1?
The intent is already included in both the main app and widget target.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Sep ’24
Comment on What is ChronoKit.InteractiveWidgetActionRunner.Errors Code 1?
Also, widgetUrl does not appear to work. I tweaked my sample app code to: Make LaunchAppIntent inherit from AppIntent and have a perform method that just returns .result() Add .widgetURL(URL(string: "otcontrolwidget://test")!) on the Image` in the control itself And tapping the control now does nothing. I'm using .widgetUrl on other widgets, but it doesn't appear to work with Control Center widget buttons.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Sep ’24
Comment on What is ChronoKit.InteractiveWidgetActionRunner.Errors Code 1?
UserDefaults.standard works in my sample app to deliver data from the control to the real app. My understanding is that this is because the perform method runs in the context of the app's process - this is why the control has to be a member of both the widget extension and full app targets. Am I wrong in this?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Sep ’24
Comment on How can I use the F8 play/pause key to control media playback in Catalyst?
Filed as FB15026010. I downloaded the Sample app, removed the existing iPad App for Mac target, added a Catalyst target, and built and ran it. After starting playback, F8 does nothing.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Sep ’24
Comment on How can I use the F8 play/pause key to control media playback in Catalyst?
MPRemoteCommandCenter *center = [MPRemoteCommandCenter sharedCommandCenter]; [center.togglePlayPauseCommand addTarget:self action:@selector(handleRemoteTogglePlayPause:)]; //... -(MPRemoteCommandHandlerStatus)handleRemoteTogglePlayPause:(MPRemoteCommandEvent *)event { [self togglePlayPause]; return MPRemoteCommandHandlerStatusSuccess; }
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Aug ’24
Comment on How can I use the F8 play/pause key to control media playback in Catalyst?
I'm already setting those command handlers - playCommand, pauseCommand, togglePlayPauseCommand, etc. Also, when I download those example projects and run them as Catalyst apps, neither of them respond to the play/pause F8 key. It just launches the macOS Music app. I am on Sonoma 14.6.1, if it matters. Do I need to file a Feedback about this not working?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Aug ’24
Comment on AsyncImage doesn't work in WidgetKit
FB13706879
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Apr ’24
Comment on Swift Package Manager: Validation / "no such file"
What boilerplate??
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Sep ’23
Comment on Getting selected text from ImageAnalysisInteraction on UIImageView
This is now possible in iOS 17 with the selectedText property! https://developer.apple.com/documentation/visionkit/imageanalysisinteraction/4176689-selectedtext
Topic: Machine Learning & AI SubTopic: General Tags:
Replies
Boosts
Views
Activity
Aug ’23
Comment on How can I replicate CALayer.maskedCorners with UIButtonConfiguration and UIBackgroundConfiguration?
Done! FB12358266
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Jun ’23
Comment on How can I integrate my own text changes into UITextView's undo manager?
FB12292111
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Jun ’23
Comment on How can I integrate my own text changes into UITextView's undo manager?
Ignore this - it should have been a comment on the post above, but there's no button to delete a post.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Jun ’23