On iOS 15 sims using Xcode 13, UITableView scrolltorowatindexpath:atScrollPosition:animated: results in the cell displaying beneath the section header - uitableview

On iOS 15.0 sims using Xcode 13.0, UITableView scrolltorowatindexpath:atScrollPosition:animated: results in the scrolled-to cell displaying partially beneath the section header (when UITableView.appearance() has previously been globally set to have a sectionHeaderTopPadding of 0.0).
So then I added it on the UITableView instance also, like [myTableView setSectionHeaderTopPadding:0.0]; but now the table scrolls to the cell after the index path that was specified, and not only its section header but half of the next section header appear at the top, sandwiched together.
Why did Apple break tables and scrolling in iOS 15.0?
What is a workaround for this? Scrolling should work the same as before. Why are they issuing breaking changes in tables instead of making the changes opt-in? So freakin' annoying.

Related

How to move accessibilty focus from UITableViewHeader to Cell in UITableView in iOS

I have one UITableView where I am adding a header using UITableHeaderView.
The header view is occupying fit to screen in small devices because of its content. And in accessibility it's not moving from table header view to table cell since those cell are not getting visible in screen.
This is working fine in iOS8 but not in iOS9.
I know accessibility post notification should work, but not sure where to fire the notification since there is no way to know that content reading done for table header view.
I would like to answer my own question. I fixed the issue by using accessibilityElementDidBecomeFocused. I checked for last label in header view whenever receives i scrolling table on tab so that other cell could get visible and voiceover can move to next element.

Make a cell (but not the first one) always visible on UITableView

I had a UIScrollView with a UIImage above a UISegmentedControl above my UITableView. I was disabling the scrolling of the TableView until the Image disappeared so I could finally enable the scrolling but sadly there was a delay on it, meaning I had to remove my finger from the screen in order to refresh the scrolling property, which I didnt like so I started again.
Now I'm getting my tableView with his customs cells. The thing is I want the cell with the segmentedControl to stay on top of my tableView. To make it easier to understand, if I scroll on cells 10, 11 and 12, I should see: cell 1 (the one with the segmentedControlon it) , 10, 11, 12 but if I scroll to the top, I should get cell 0, 1, 2, 3.
I can't seem to find any solution but the Twitter IOS Application does seem to manage it, any solutions for my problem ?
You could try splitting your tableView into two sections, where cell 0 is in the first section, cell 1 is the header for the second section, and cells 2...n are in the second section. This would probably give you the behavior you want ('cell 1' always visible) without having to fight the normal UI behavior.

iOS dynamic height cell in tableview- issue with row 0 and 7

I am having a tableview in which I am displaying my data. As you can assume from the title, these cells are dynamic in their content, and so should their height be. Actually I got it working, but I have a strange issue with the row 0 and 7. These 2 rows take my entire screen, but when I scroll past them and go back again everything is fine. I am not sure but the 7. cell must be among the first cells that are being "dequed" when I scroll down. But as I said, this is just the first time they are being displayed, when I scroll again to one of them, everything is looking good (when filling the tableview with new data it is also fine).
I tried to reload the tableview twice when it is being populated for the first time, but without success. The presentation of the first cell I have fixed calling : self.tableView reloadAtIndexPaths ... when the table is being populated for the first time,
and it worked, it has the height it should have regarding its size. But I still have the issue with cell number 7 (the above fix does not work for this cell, I assume because it is not being displayed at that moment)
I am not using any fancy height calulation, just the iOS 8 feature:
self.tableView.rowHeight = UITableViewAutomaticDimension
self.tableView.estimatedRowHeight = 80
Is there a method, fix with which i can force the tableview to draw the cells again ?
Thanks
Cell size is calculated from constrains. So I assume there is something wrong with those or with data during computation.
try this:
in tableview cell subclass use -prepareForReuse method to clean cell data as before reuse.

iOS - UITableView Cell goes Blank when built on iOS7 but works on earlier Versions

What is happening?
I am updating an application that was developed on iOS 4.3 and now while building its update on iOS7 the TableView Goes totally White.
What i have Tried?
I already have checked the following questions here and here
What is my application Flow?
Basically,There is a UItableView and in each cell of a tableView there is ViewController's View Added in that View and in each View there is a Paging Control and in that Paging control there are custom View just like a grid which was not available in iOS that time.
Did you make sure to add the subviews to the cells contentView rather then adding them directly to the cell?
Another thing that changed in iOS 7 with UITableViewCells was the addition of UITableViewCellScrollView to the underlying structure.
here is a visual example of the change: http://www.curiousfind.com/blog/646

Removing/hidding a grouped table view cell's border in iOS7

I have a custom cell that contains an UISegmentedControl, and such cell is loaded in a grouped-style table view. Since in iOS 7 section separators have the table view's width, I need to hide or remove them. I've read this post dealing with this issue:
IOS 7: Removing border from a section of grouped-style UITableView
Is there a simpler way to achieve this?
Thanks!

Resources