I wondered how I can make a NSTableView
to behave like a UITableView
on iOS. For example, splitting the content into sections as well as the typical behaviour of the section headers.
Is that possible? If so, how?
Thank you very much.
UITableView manages the basic appearance of the table, but your app provides the cells (UITableViewCell objects) that display the actual content. The standard cell configurations display a simple combination of text and images, but you can define custom cells that display any content you want.
Table views are one of the most ubiquitous controls in macOS applications, with familiar examples being Mail’s message list and Spotlight’s search results. They allow your Mac to represent tabular data in an attractive way. NSTableView arranges data in rows and columns.
The basic cell-based NSTableView looks similar to this: This is a super clear and useful way to display lots of data in a sortable table. For my project I needed something a bit more aesthetically pleasing for use in a context where there would always be a fixed number of table cells in a fixed order.
UITableView is used to display data in a list and it also gives the developer a fair amount of control over how the data is presented and how the user can interact with it. And for people from other realms, it’s like RecyclerView of Android and FlatList of React Native.
Check NoodleStickyRowTableView:
http://www.noodlesoft.com/blog/2009/09/25/sticky-section-headers-in-nstableview/
It's part of NoodleKit:
https://github.com/MrNoodle/NoodleKit
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With