Switch to using maptables to track some metadata bout items so that we can match items up when we need to find them by indexPath or point. Remove uneeded ivar from layout. Add call to delegate when selecting item

This commit is contained in:
Gregory John Casamento 2022-09-20 05:02:10 -04:00
parent bf3ddc8cad
commit 2bec53bf0f
4 changed files with 27 additions and 12 deletions

View file

@ -443,12 +443,12 @@ APPKIT_EXPORT_CLASS
NSMutableSet *_indexPathsForVisibleItems;
NSMutableDictionary *_visibleSupplementaryViews;
NSMutableSet *_indexPathsForSupplementaryElementsOfKind;
NSMutableDictionary *_itemsToAttributes;
// Private
// Map items -> indexPath
NSMapTable *_itemsToIndexPaths;
NSMapTable *_indexPathsToItems;
NSMapTable *_itemsToAttributes;
// Registered class/nib for item identifier
NSMapTable *_registeredNibs;