---
title: Views and Controls
framework: appkit
role: collectionGroup
role_heading: API Collection
path: appkit/views-and-controls
---

# Views and Controls

Present your content onscreen and handle user input and events.

## Overview

Overview Views and controls are the building blocks of your app’s user interface.

Views can host other views. Embedding one view inside another creates a containment relationship between the host view (known as the superview) and the embedded view (known as the subview). View hierarchies make it easier to manage views. You can also use views to do any of the following: Respond to touches and other events (either directly or in coordination with gesture recognizers). Draw custom content using Core Graphics. Respond to focus changes. Animate the size, position, and appearance attributes of the view using Core Animation. Favor AppKit views and controls whenever possible. These components adapt automatically to system changes, and many support appearance customizations to support the look and feel you want in your app. When AppKit doesn’t provide the exact view or control you need, you can create a custom view. NSView is the root class for all views and defines their common behavior. NSControl defines additional behaviors that are specific to buttons, switches, and other views designed for user interactions. For additional information about how to use views and controls, see Human Interface Guidelines.

## Topics

### View fundamentals

- [NSView](appkit/nsview.md)
- [NSControl](appkit/nscontrol.md)
- [NSCell](appkit/nscell.md)
- [NSActionCell](appkit/nsactioncell.md)

### Container views

- [Localization-friendly layouts in macOS](xcode/localization-friendly-layouts-in-macos.md)
- [Grid View](appkit/grid-view.md)
- [NSSplitView](appkit/nssplitview.md)
- [Organize Your User Interface with a Stack View](appkit/organize-your-user-interface-with-a-stack-view.md)
- [NSStackView](appkit/nsstackview.md)
- [NSTabView](appkit/nstabview.md)
- [Scroll View](appkit/scroll-view.md)

### Content views

- [Browser View](appkit/browser-view.md)
- [Collection View](appkit/collection-view.md)
- [Outline View](appkit/outline-view.md)
- [Table View](appkit/table-view.md)
- [NSTextView](appkit/nstextview.md)

### Controls

- [Responding to control-based events using target-action](uikit/responding-to-control-based-events-using-target-action.md)
- [NSButton](appkit/nsbutton.md)
- [NSColorWell](appkit/nscolorwell.md)
- [Combo Box](appkit/combo-box.md)
- [NSComboButton](appkit/nscombobutton.md)
- [Date Picker](appkit/date-picker.md)
- [NSImageView](appkit/nsimageview.md)
- [NSLevelIndicator](appkit/nslevelindicator.md)
- [Path Control](appkit/path-control.md)
- [NSPopUpButton](appkit/nspopupbutton.md)
- [NSProgressIndicator](appkit/nsprogressindicator.md)
- [NSRuleEditor](appkit/nsruleeditor.md)
- [NSPredicateEditor](appkit/nspredicateeditor.md)
- [Search Field](appkit/search-field.md)
- [NSSegmentedControl](appkit/nssegmentedcontrol.md)
- [Slider](appkit/slider.md)
- [NSStepper](appkit/nsstepper.md)
- [Text Field](appkit/text-field.md)
- [Token Field](appkit/token-field.md)
- [Toolbar](appkit/toolbar.md)
- [NSSwitch](appkit/nsswitch.md)
- [NSMatrix](appkit/nsmatrix.md)

### Liquid Glass effects

- [NSGlassEffectView](appkit/nsglasseffectview.md)
- [NSGlassEffectView.Style](appkit/nsglasseffectview/style-swift.enum.md)
- [NSGlassEffectContainerView](appkit/nsglasseffectcontainerview.md)

### Observing data in views

- [Updating views automatically with observation tracking](appkit/updating-views-automatically-with-observation-tracking.md)
- [layout()](appkit/nsview/layout().md)
- [updateConstraints()](appkit/nsview/updateconstraints().md)
- [updateLayer()](appkit/nsview/updatelayer().md)
- [draw(_:)](appkit/nsview/draw(_:).md)

### Observing data in view controllers

- [viewWillLayout()](appkit/nsviewcontroller/viewwilllayout().md)
- [viewDidLayout()](appkit/nsviewcontroller/viewdidlayout().md)
- [updateViewConstraints()](appkit/nsviewcontroller/updateviewconstraints().md)

### Interacting with adjacent views

- [NSBackgroundExtensionView](appkit/nsbackgroundextensionview.md)

### Visual adornments

- [NSVisualEffectView](appkit/nsvisualeffectview.md)
- [NSBox](appkit/nsbox.md)

### UI validation

- [NSUserInterfaceValidations](appkit/nsuserinterfacevalidations.md)
- [NSValidatedUserInterfaceItem](appkit/nsvalidateduserinterfaceitem.md)

### Tool tips

- [NSViewToolTipOwner](appkit/nsviewtooltipowner.md)

### Related types

- [NSRectAlignment](appkit/nsrectalignment.md)
- [NSDirectionalEdgeInsets](appkit/nsdirectionaledgeinsets.md)
- [NSDirectionalRectEdge](appkit/nsdirectionalrectedge.md)

## See Also

### User Interface

- [View Management](appkit/view-management.md)
- [View Layout](appkit/view-layout.md)
- [Appearance Customization](appkit/appearance-customization.md)
- [Animation](appkit/animation.md)
- [Windows, Panels, and Screens](appkit/windows-panels-and-screens.md)
- [Sound, Speech, and Haptics](appkit/sound-speech-and-haptics.md)
- [Supporting Continuity Camera in Your Mac App](appkit/supporting-continuity-camera-in-your-mac-app.md)
