table 新功能

Asked on 2025-11-01

1 search

At WWDC, Apple introduced several new features related to tables across different frameworks:

  1. UIKit: In iOS 18, collection and table view APIs have been updated to make it easier to update your cells. All views in UI collection view list sections and UITableViews now have the list environment trait, which describes the style of the list that the view is in. This helps ensure that your app's UI is consistent with the list's style. Additionally, new header and footer configurations automatically update their appearance from the list environment trait. (What’s new in UIKit)

  2. SwiftUI: SwiftUI has introduced a new feature called TableColumnForEach, which allows for a dynamic number of table columns. This is particularly useful for applications that need to display varying amounts of data in a tabular format. (What’s new in SwiftUI)

  3. Vision Framework: The Vision framework now allows you to extract data as a table from documents, providing table coordinates with respect to the image. Each table cell has properties indicating its row and column, and the content of the cell can include text, tables, lists, or barcodes. This feature is useful for applications that need to process and analyze tabular data from images. (Read documents using the Vision framework)

These updates enhance the capabilities of table handling in both UIKit and SwiftUI, as well as provide new ways to interact with tabular data using the Vision framework.