Is AppKit causing you frustration? Instead of just complaining about it, lets try to make it better by compiling a list of specific problems with AppKit. Leave a comment below, and I'll include it in the list.
##NSView##
NSViewdoes not have the ability to set an affine transform (rdar://15608609)- Controls that have cells (such as
NSTextField) do not respond properly when layer-backed. TakeNSButtonas an example. When not layer-backed, it will animate properly using the animator proxy. When layer-backed, using the animator proxy breaks focus rings (they jump to destination immediately). Currently, directly manipulating the layer of a cell-based control is not supported (and will lead to a broken interface), but is much needed. (rdar://15608822)
##NSViewController##
NSViewControllercould be more useful. It has-loadViewbut no other lifecycle methods. (rdar://15608948)
##NSClipView##
. Improved under 10.9.NSClipViewhas performance issuesRBLClipViewattempts to fix this.
NSClipViewhas a poor animation when using-scrollRectToVisible:. (rdar://15609175)JNWClipViewattempts to fix this.
##NSTableView##
NSTableViewhas odd animation artifacts when scrolling with the keyboard with a fast key repeat.- Due to the clip view issue mentioned above. (rdar://15609175)
NSTableViewdoes not fully support sections – all rows in the table are numbered sequentially, rather than as (section #, row #) asUITableViewdoes. This makes it difficult to alter sections independently. (rdar://15609306)
##NSCollectionView##
NSCollectionViewis not performant. It loads every single cell all at once, and it keeps them all in memory. It does not reuse cells. (rdar://15609666)
##NSBrowser##
NSBrowseris not view-based likeNSTableViewandNSOutlineView.
##NSSlider##
NSSliderrequires use of private method-_usesCustomTrackImagein order to completely customize appearance.NSSliderneeds a "rounded textured" style for use in window frames (like in Finder).
##NSSearchField##
NSSearchFielddoes not support tokens.
##NSTextField##
NSTextFielddoes not support a custom context menu when the text is selectable and/or editable. It requires hacking around with the field editor to implement this functionality.
##NSSplitView##
NSSplitViewmakes simple customization like setting priorities and min/max sizes for views is unnecessarily complex.
##NSProgressIndicator##
NSProgressIndicatorstill draws the original progress bar even if drawing is overridden. (rdar://15609817)NSProgressIndicator's color cannot be changed without workarounds such as Core Image filters. (rdar://15609817)
##NSPopover##
NSPopoverdoes not offer a way to customize its appearance apart from the two default styles.RBLPopoverattempts to fix this.
NSPopoversteals keyboard focus.
##NSWindow##
NSWindowanimation is poor without the use of some not-so-nice hacks.- Borderless
NSWindows(NSBorderlessWindowMask) do not have the ability to round their corners. - Borderless
NSWindowswith a layer-backed content view do not get a shadow. NSWindowis really difficult to customize.INAppStoreWindowattempts to fix this.
##NSDocument##
NSDocumenthas very bad support for documents that aren't fully loaded into memory. Nearly all of the API assumes that you can generate a singularNSDataobject to store your document in, which isn't true if half of your document is on disk only and the other half in memory only.NSPersistentDocumentdoesn't support file wrappers (bundles), even though that's a requirement for the sqlite data storage with sandboxing enabled. All workarounds at this point are huge hacks.
##NSObjectController##
- While
NSObjectControllerand its subclasses (e.g.NSArrayController) support retrieving objects from a Core Data managed object context, they do not offer a way to receive per-change notifications. This means that you need to reload your entire view vs. inserting/removing/moving the cells that were updated. Ideally, we would want a port ofNSFetchedResultsController.
##NSDrawer##
NSDrawershould either be deprecated or have its API fully updated to support customization.
##NSImage##
NSImagedoes not support drawing stretchable images with caps.RBLResizableImageattempts to fix this.
##Field Editors##
- Field editors are conceptually unusual and confusing.
##Cells & Controls##
- The use of cells in specific controls such as
NSTextFieldandNSButtonmake them difficult to customize. NSButtonCellis poorly thought out.bezelStyle,gradientType,buttonType,isHighlighted,stateand a few more make for a really really confusing subclassing experience.NSTextFieldCelldoes not have vertically-centered text. A subclass is required.- Template images and window-style engraved text should be useable without the use of captive cells.
- AppKit controls need image-based customization properties like their UIKit counterparts.
- AppKit does not provide HUD-styled controls.
SNRHUDKitattempts to fix this.
- Interface Builder does not support bindings for custom controls.
##Misc. (not necessarily AppKit)###
- There is no Cocoa wrapper for the Carbon hotkeys API.
DGGHotKeyattempts to fix this.
- There is no Cocoa wrapper for
FSEvents. The Spotlight stuff doesn't really work for sandboxed Applications. - There is no API for AirPlay.
Also:
NSPopover, apart from the two default styles.