Post

Replies

Boosts

Views

Activity

weird behaviour of UITableView cell recycling
I've got a table view where I'm using [UITableView dequeueReusableCellWithIdentifier:forIndexPath:] to obtain cells. In my test scenario table is static (I do not scroll no change to number of rows etc), but I periodically call reloadData. One of cells is partially off-screen (entire contents of the table view extends beyond height of container view). I'd expect that in such scenario, when I try to dequeue a cell for the same index path and same identifier, I will get the same instance that was used previously, but I noticed that table view tends to return cell previously used at different index path (essentially swapping the cells). Is it an expected, desired behaviour?
2
0
3.4k
Apr ’22
weird behaviour of UITableView cell recycling
I've got a table view where I'm using [UITableView dequeueReusableCellWithIdentifier:forIndexPath:] to obtain cells. In my test scenario table is static (I do not scroll no change to number of rows etc), but I periodically call reloadData. One of cells is partially off-screen (entire contents of the table view extends beyond height of container view). I'd expect that in such scenario, when I try to dequeue a cell for the same index path and same identifier, I will get the same instance that was used previously, but I noticed that table view tends to return cell previously used at different index path (essentially swapping the cells). Is it an expected, desired behaviour?
Replies
2
Boosts
0
Views
3.4k
Activity
Apr ’22
SwiftUI macOS app without initial window
Is there a way for Swift UI based, macOS app not to show a window at startup? For example, the app would offer several commands on the menu bar and it should depend on selected command which window should be shown.
Replies
0
Boosts
0
Views
945
Activity
Dec ’21