Skip to content

Simple example of how to populate data to an NSTableView with Swift (macOS programming)

License

Notifications You must be signed in to change notification settings

ngthanhbinh85/Example-NSTableView-macOS-Swift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example-NSTableView-macOS-Swift

Simple example of how to populate data to an NSTableView with Swift (macOS programming)

In this example, the data is stored in an Array of Student objects.

Call this to get the Data:

MyData.getStudentList()

To populate data to NSTableView, we need to implement the NSTableViewDataSource protocol and implement the following 2 methods:

func numberOfRows(in tableView: NSTableView) -> Int

func tableView(_ tableView: NSTableView, objectValueFor tableColumn: NSTableColumn?, row: Int) -> Any?

About

Simple example of how to populate data to an NSTableView with Swift (macOS programming)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages