<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTableView/noteNumberOfRowsChanged()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTableView(im)noteNumberOfRowsChanged"
  },
  "title" : "noteNumberOfRowsChanged()"
}
-->

# noteNumberOfRowsChanged()

Informs the table view that the number of records in its data source has changed.

```
func noteNumberOfRowsChanged()
```

## Discussion

This method allows the table view to update the scrollers in its scroll view without actually reloading data into the table view. It’s useful for a data source that continually receives data in the background over a period of time, in which case the table view can remain responsive to the user while the data is received.

See the [`NSTableViewDataSource`](/documentation/AppKit/NSTableViewDataSource) protocol specification for information on the messages an `NSTableView` object sends to its data source.

> Note:
> When using ``doc://com.apple.appkit/documentation/AppKit/NSView``-based table views this method should be avoided. The table will query the data source for the new number of rows, and properly insert (or remove) rows at the end of the table as necessary with an animation.
> 
> When using ``doc://com.apple.appkit/documentation/AppKit/NSCell``-based table views this method tells the table that there may be more (or less) rows available and to reload state based on that information.
> 
> This method does not work for ``doc://com.apple.appkit/documentation/AppKit/NSOutlineView``, and should not be called.

## See Also

[`func reloadData()`](/documentation/AppKit/NSTableView/reloadData())

Marks the table view as needing redisplay, so it will reload the data for visible cells and draw the new values.

[`func numberOfRows(in: NSTableView) -> Int`](/documentation/AppKit/NSTableViewDataSource/numberOfRows(in:))

Returns the number of records managed for `aTableView` by the data source object.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)