Posts

Post not yet marked as solved
17 Replies
The workaround is no longer necessary as of beta 3 which deprecates tabItemLabel in favor of tabItem.
Post not yet marked as solved
24 Replies
That seems to be recommended approach for read-only use cases. But what if you wanted to have a binding to a property in the managed object to be mutated in the UI?
Post marked as solved
6 Replies
Form has been added in beta 2, but it's currently only available on iOS (unlike List which is available on all platforms).
Post not yet marked as solved
12 Replies
Not yet fixed in beta 2.
Post not yet marked as solved
3 Replies
A SwiftUI file created from the default template includes a PreviewProvider guarded by an `#if DEBUG` statement. In order to include this in the binary used by Xcode's preview cancas, open your project settings, expand "Active Compilation Conditions" (SWIFT_ACTIVE_COMPILATION_CONDITIONS) and add "DEBUG" in the debug configuration.
Post not yet marked as solved
12 Replies
Also, if you try to use the NSDiffableDataSourceSnapshotReference that is passed to your delegate in controller(_, didChangeContentWith:), you get all sorts of type errors which seem to indicate a problem with how this type is imported into Swift:(lldb) po snapshot.sectionIdentifiers Precondition failed: NSArray element failed to match the Swift Array Element type Expected NSManagedObjectID but found __NSCFConstantString: … (lldb) po snapshot.itemIdentifiers Precondition failed: NSArray element failed to match the Swift Array Element type Expected NSString but found NSTemporaryObjectID_0: …This lets me think that NSDiffableDataSourceSnapshotReference<NSManagedObjectID, NSString> should probably be NSDiffableDataSourceSnapshotReference<NSString, NSManagedObjectID>.
Post not yet marked as solved
12 Replies
This doesn't look ready, yet. The example is clearly wrong, as the cast operates on unrelated types and always fails when you add the missing generic paramaters, given the following class declarations in beta 1:open class NSDiffableDataSourceSnapshotReference<sectionidentifiertype, itemidentifiertype=""> : NSObject, NSCopying where SectionIdentifierType : AnyObject, ItemIdentifierType : AnyObject { public class NSDiffableDataSourceSnapshot<sectionidentifiertype, itemidentifiertype=""> where SectionIdentifierType : Hashable, ItemIdentifierType : Hashable {