cost 118 ms
用 UITableView 和 UITableViewDiffableDataSource 在 UIViewController 中滑動刪除

[英]Swipe delete in UIViewController with UITableView and UITableViewDiffableDataSource

我有一個UIViewController和一個UICollectionView和一個UITableView 。 這兩個視圖分別使用UICollectionViewDiffableDataSource和UITableViewDiffableDataSource 。 在表中,我正在嘗試為刪除操作設置滑動 ...

有沒有辦法匹配 UITableViewDiffableDataSource 中的部分數匹配字典鍵數

[英]Is there a way to match Number of Sections match Dictionary Keys count in UITableViewDiffableDataSource

我正在嘗試按第一個字符對名稱進行分組,並使用新的 UITableViewDiffableDataSource 在 ViewController 中顯示它。(例如聯系人應用程序) 下面是我使用舊數據源方法的代碼。 使用舊的 UITableViewDataSource,我得到了視圖,但我如何使用 Dif ...

在快照中應用更改后,DiffableDataSource 未正確更新

[英]DiffableDataSource does not update properly after applying changes in snapshot

我正在嘗試過濾 TableViewDiffableDataSource 中的用戶列表。 過濾后的用戶數組傳遞給以下 function: 調試顯示用戶已正確附加到快照中。 但是應用會顯示正確數量的過濾用戶,但只會顯示完整列表頂部的用戶。 即,如果我有完整的用戶列表 [Chloe、Max、John、Ma ...

UITableViewDiffableDataSource 不是 deinit

[英]UITableViewDiffableDataSource are not deinit

我想在我的項目中使用組合並面對問題。 這是 ViewController 的代碼 這是單元格的代碼。 ViewController 的deinit未被調用。 但是當我將此代碼用於 ViewController 一切都很好。 deinit調用。 我嘗試將 dataSource 設置為可選並將其設 ...

應用 UITableViewDiffableDataSource 快照后 TableView 滾動到頂部

[英]TableView scrolling to top after applying UITableViewDiffableDataSource snapshot

我正在使用 UITableViewDataSourcePrefetching 進行分頁。 這些值將從 Realm 本地存儲中獲取。 我將得到一組對象。 這些值將應用於現有的 UITableViewDiffableDataSource 數據源。 應用快照后,tableview 滾動到頂部。 我已驗證我 ...

> 20K 行的不同數據源性能問題

[英]Diffable datasource performance issues with > 20K rows

當擁有更大的數據集(大約 22,000 個項目)時,我遇到了 diffable 數據源的性能問題。 我很驚訝當 animation 為 ON 時應用快照需要這么多時間。 見代碼部分: 注意:Jesse Squires 提供了一個很好的資源: 我的問題是,鑒於應用快照是 O(n) 操作,我是否遺漏了某 ...

tableView(canEditRowAt) 不再使用 tableViewDiffableDataSource

[英]tableView(canEditRowAt) no longer working with tableViewDiffableDataSource

我創建了一個相當簡單的 tableView,用於為項目 model 選擇類別。 昨天一切正常。 今天我一直在嘗試將 tableView 數據源切換到UITableViewDiffableDataSource ,因為我想把頭繞在 API 上。 我已經備份並運行了整個 tableView,除了我不能再 ...

未使用 UIViewController 中的 UITableViewDiffableDataSource 填充單元格

[英]Cells are not populating using UITableViewDiffableDataSource in UIViewController

在我將子類從 UITableViewController 更改為 UIViewController 之前,我的代碼正在運行。 切換的原因是我需要在我的 tableView 之上添加一個 collectionView。 但現在細胞沒有填充。 快照仍在被調用,用戶數組有它的內容。 不知道為什么更改為 U ...

UITableViewDiffableDataSouce:無效更新:無效的節數

[英]UITableViewDiffableDataSouce: Invalid update: invalid number of sections

我正在嘗試應用一個空快照,它使我的應用程序崩潰。 我已經嘗試調試它 2 天了,但似乎無法找到解決此問題的方法。 下面是我正在運行的代碼: 這是我得到的錯誤: 我不明白的是為什么在更新之前還有一個部分以及如何處理它。 謝謝。 ...

在表/集合視圖控制器及其關聯的可區分數據源子類之間共享數據模型的好方法是什么?

[英]What is a good approach to sharing a data model between a table/collection view controller and its associated diffable data source subclass?

我有一個UITableViewController ,其中聲明了一個模型屬性。 當從UITableViewDataSource協議一致性遷移到表視圖控制器之外的UITableViewDiffableDataSource子類時,模型在數據源中不再可訪問。 在兩者之間共享數據模型的推薦方法是什么,比如 ...

SWIFT:將 tableView 定義為 tableViewCell 的 ViewController 中的數據通信

[英]SWIFT: Communicating data from ViewController where tableView is defined to tableViewCell

我以編程方式在 viewController 中實現了一個 tableView: tableViewCell 也是以編程方式實現的: 我想要實現的: 填充moviesItemsArray內MoviesViewController5 根據索引將moviesItemsArray每個 ...

具有 uitableviewdiffabledatasource 的自調整單元格

[英]self sizing cell with uitableviewdiffabledatasource

我有一個詳細的 ViewController,其單元格由自定義的 uitableviewdiffabledata 定義,如下所示: 我想制作這樣定義的 InfoTableViewCell: 我想讓這個單元格根據 textField 中的文本調整大小。 關於如何做到這一點的任何提示? PS 我正在使 ...

不同對象的 UITableViewDiffableDataSource 和 NSDiffableDataSourceSnapshot 只顯示一行

[英]UITableViewDiffableDataSource and NSDiffableDataSourceSnapshot for different objects shows only one row

我已經使用UITableViewDiffableDataSource和NSDiffableDataSourceSnapshot實現了 UITableView 在段更改時,更新 Wrapper 類型的數據。 但問題是每次只顯示一條記錄。 感謝任何幫助,謝謝 ...

支持 iOS 12 和 13 時的 UITableView 和 Diffable 數據源

[英]UITableView And Diffable Data Source when supporting iOS 12 and 13

我已經在我的項目中實現了 UITableView Diffable Datasource。 它在 IOS 13 中運行良好。當我在 iOS 13 版本以下運行此應用程序時,它會警告我它僅在 ios 13 上可用。 所以我正在嘗試為 iOS 13 版本以下實施 UITableView。 UITabl ...

當使用 class 與 struct 時,UITableViewDiffableDataSource 和 UICollectionViewDiffableDataSource 的工作方式不同

[英]UITableViewDiffableDataSource and UICollectionViewDiffableDataSource working different when class vs struct is used

我注意到,在使用UITableViewDiffableDataSource / UICollectionViewDiffableDataSource時,ItemIdentifierType 使用時 當StringCellObject是 class 時,甚至不調用 Hashable 函數並且對象始終被 ...


 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM