Releases: CleanCocoa/FatSidebar
Releases · CleanCocoa/FatSidebar
Swift 5 Release
- Scalable icons
- Changes to fixed-width configuration instead of draggable sidebar width
Non-selection single-click sidebar
Double-clicking does not invoke editing by default anymore so that quick toggles are possible in your app.
Also, the new .push
selection state triggers item click events without changing the selection in case you don't want permanent selections at all.
Integration Improvements
Styling:
- Added item label font and color customization through
FatSidebarItemStyle
- Added item removal delegate callback
- Added
editFatSidebarItem(_:)
IBAction
for Interface Builder wirings, e.g. in contextual menus
Selection handling:
- Added public visibility to
selectedItems
- Added
deselectAllItems()
as a convenience command - Added
selectItem(at:)
in case you don't keep the item references around - Added item toggle (in addition to, not as a replacement of selection!) delegate callback
Fixes:
- Fixed double-clicking an item triggering a (de)selection after a slight delay
- Fixed quickly moving mouse away from item not hiding the hover overlay if its animation did not yet finish
Drag & Drop-Reordering
Apart from using (and fixing) Auto Layout for the component, it's now possible to drag items around to reorder them.
Library
-
added drag-to-reorder
-
added double-click callbacks
-
added new delegate methods:
public protocol FatSidebarDelegate: class { /// Triggered after the user finishes dragging an item into a new place. func sidebar(_ sidebar: FatSidebar, didMoveItemFrom oldIndex: Int, to newIndex: Int) /// Triggered when an item is single-clicked and its status changes. /// Already selected items that cannot be deselected will not trigger this. func sidebar(_ sidebar: FatSidebar, didChangeSelection selectionIndex: Int) /// Triggered by double-clicking an item. func sidebar(_ sidebar: FatSidebar, editItem index: Int) }
-
added notifications to
FatSidebarView
for most events:didToggleItemNotification
didSelectItemNotification
didDeselectItemNotification
didReorderItemNotification
didDoubleClickItemNotification
Sample app
- added real model to power the sidebar (like you would in your app)
- made items editable with double-click
Initial release
- Small an regular size items
- Expand on hover for small items
- Theming of the sidebar and its items
- Proportional item layout, adjusting spacing %-based to the item size