Post

Replies

Boosts

Views

Activity

UIWritingToolsCoordinator.Context Lifetime?
What is the lifetime of a UIWritingToolsCoordinator.Context object? The UIWritingToolsCoordinator.Delegate API expects you to maintain a reference to the context identifiers you create in writingToolsCoordinator(:contextsFor:) to be able to return them in writingToolsCoordinator(:rangeInContextWithIdentifierFor:). At some point, you need to release these references. Can you, for example, assume that the context will not be referenced after writingToolsCoordinator(_:willChangeToState:) is called with a state of .inactive?
Topic: UI Frameworks SubTopic: UIKit
0
1
274
Dec ’24
UIDocumentViewController and multiple windows
I'm trying to migrate my document-based app to UIDocumentViewController so that it can take advantage of the new launch experience in iOS 18. Unfortunately, UIDocumentViewController closes the UIDocument when the document is set to nil or the controller is deallocated. This means you can't have the same document in more than one scene. Is there any way to prevent UIDocumentViewController from closing the document? -Steve
Topic: UI Frameworks SubTopic: UIKit
1
0
470
Jul ’24
Recommended order of iOS 16 navigation buttons for editor style?
The What's New in iPad Design session shows a slightly different order of navigation controls than what is available in the WWDC seed. The Pages toolbar, for example, shows the back button (managed by the toolbar?) followed by the sidebar button (managed by the UISplitView). Apps compiled with the seed feature the sidebar button followed by the back button. If the former is the design guidance, is there a setting that enables this behavior?
0
1
1.4k
Jun ’22
Page-based layouts with TextKit 2?
In the "old" TextKit, page-based layout is accomplished by providing an array of NSTextContainers to NSLayoutManager, each with its own NSTextView. TextKit 2, NSTextLayoutManager allows only a single text container. Additionally, NSTextParagraph seems to be the only concrete NSTextElement class. Paragraphs often need to break across page boundaries. How would one implement page-based layout in TextKit 2?
4
0
3.4k
Jun ’21
UIDocumentBrowserViewController not showing Locations
On iOS 15 beta 1 running on a 12.9 iPad Pro, the UIDocumentBrowserViewController in my app does not display the Locations group or any of its members (On My iPad, iCloud Drive, etc...). This happens both for the shipping version in the App Store and for versions built with the iOS 15 SDK. However, the Locations group is displayed correctly in the Files app and for a sample project built from the document-based app template. I assume this is a plist issue or is perhaps related to the fact that the iPad was updated from iOS 13. I am wondering if anyone else is encountering this. Submitted as FB9140143. -Steve
1
0
1.2k
Jun ’21
Menus don't work in UIDocumentBrowserViewController additionalTrailingNavigationBarButtonItems
iOS 14 adds menu support to UIBarButtonItems. UIDocumentBrowserViewController lets you add bar button items to the navigation bar via the additionalTrailingNavigationBarButtonItems property. However, adding a bar button item with a menu results in a button whose menu can not be activated by a press or click. (FB8339455) Anyone have a workaround? (void)viewDidLoad {     [super viewDidLoad];     // ...     UIMenu *menu = [UIMenu menuWithChildren:[self menuElements]];     self.additionalTrailingNavigationBarButtonItems = @[[[UIBarButtonItem alloc] initWithImage:icon menu:menu]]; }
5
1
1.5k
Aug ’20