iOS: ios 11 UITableView behaviour changed - ios

In iOS 11 This is a pretty big change in behaviour of UITableview and existing code/or below iOS11 may work differently.
When i insert data in tableview row, row behaves weird like jumping or scrolling up and down.

I solved my issue:
In iOS 11, UITableView uses estimated heights by default. This is a big change in behaviour and existing code may work differently. Just put 0 to tableview property estimatedRowHeight.
yourTableView.estimatedRowHeight = 0.0

Related

UITableView Parallax Header flickers when reloadRowsAtIndexPath on iOS +11.0

I have tableView: UITableView object with a parallax header. Initially, the header height is 3/4 of the screen height.
If the tableView is scrolled to a little bit to top and tried to reloadRowsAtIndexPath, you will clearly notice a flickering happens.
The flickering occurs only on iOS +11.0 devices. However, if you assigned an arbitrary value to estimatedRowHeight that is too high, the tableView won't flicker, and vice-versa.
Since the UITableView had a lot of changes in iOS 11.0, I might be missing something.
I have initialized a repo with a sample project for the issue, you can test on iOS +9.0.
Example GIF:
Note: I have tried too many approaches for the parallax header, the issue always happens.

iOS9 / Xcode 7 Custom Cell Label Alignment Issues

I am having an issue with layouts in custom cells in Xcode in my iOS app since it updating to Xcode 7 and iOS 9 SDK.
On the example screenshot below, the custom cells that I have created with labels inside them are not aligning to the correct default inset/indent that the normal non-custom cells are at.
Specifically as you can see below, the cells in Section 1 are all very close to the left edge (custom cells), as is Cell 0 in Section 2 (Online label is too snug, and the switch is too far to the right), whereas Cells 1-3 in Section 2 (normal default style cells) have the correct default ~15px indent.
Previously it worked correct in iOS8 with Xcode 6.x, but not after the update....how can I solve this?
I found that this issue can be solved by using the accepted solution for this question here! Good luck and happy coding!
UITableViewCell with autolayout left margin different on iPhone and iPad

heightForRowAtIndexPath is not called after cellForRowAtIndexPath in iOS 7

I have a grouped UITableView whose cells' content is dynamic. I need to calculate the actual height I need for each cell in cellForRowAtIndexPath: method. I'm testing in both iOS 7 and iOS 8 devices and I'm finding that in iOS 8 the method heightForRowAtIndexPath: is called when cellForRowAtIndexPath: returns (and then, I have cell's height updated), but it is not called in iOS 7 (so all cell's height is always the same).
I wasn't able to find a solution for this problem... please, could somebody help me?
Thanks in advance
Your premise is faulty. If you are doing this correctly, then in both iOS 7 and iOS 8 (and in all systems before that, in fact), heightForRowAtIndexPath: is called before your call to cellForRowAtIndexPath:. In general what happens is that heightForRowAtIndexPath: is called for every row, before the first call to cellForRowAtIndexPath:. That way, the table has enough information for layout before it starts generating cells.
If you are seeing a difference in behavior, it may be because you are also using the estimatedRowHeight, which does behave differently in iOS 8 vs. iOS 7. So the easy solution is: don't do that.

iOS 7.1 beta5 tableviewcell height showing objects outside it's range

I have an app that has a list of UITableViewCells. By default, the cells are set to a certain height (lets say 100) to show only some basic information. When the user clicks on a cell the height changes to 150 to show more actions that were previously not seen. This works without a problem on iOS 7.0.0-7.0.5. I'm testing on an iPhone 5s running iOS 7.1 beta 5 and seeing some drawing issues with the cells.
Here's how it looks on iOS 7.0... versions which is what is expected. When the cell is collapsed, the buttons that are positioned past the height of the cell are hidden and when the cell is expanded to a height to show the buttons, they are visible.
Cell expanded:
The following is the cell when collapsed:
Here are the issues I'm seeing with iOS 7.1 beta. Im curious if this is just something that is a problem with the beta or if I'll have to rethink how this is being coded currently. As far as I can tell this has been present since the first beta of 7.1.
As you can see, the button which was previously hidden is now still showing even though the cell is collapsed.
Is this an issue with the beta that anyone else has seen or is this expected behavior now? Thank you for you help!
Try setting clipsToBounds=YES in your cell as it may be drawing outside of it bounds.
cell.clipsToBounds =YES
Also check that the cell height is actually collapsed.

How to make the cell wider in iOS6 iPad

I have an app which was designed for iPad and iPhone. For iPhone everything is ok but in iPad version for the iOS6 platform there is an extra space from the left and right sides of the cell - in iOS7 it's ok. You can see them in storyboards on the next screenshot:
and the sizes for the cell:
How can I remove this extra space ?
There is little changes between IOS 6 & IOS 7 for the UITableView grouped(UITableViewCell):
IOS6 :
cell.contentView and cell.view is totally different with their frames .
IOS 7 :
Cell.ContentView is nothing but the Whole View of the Cell .
IOS 6(VIEW):
If you still wants to do with your thought then make it as Plain Style for UITableView OR by Subclassing the cell.
NOTE: This is not an answer for your question. Its just the way to suggest
Are you using table type group ?
Try changing the UITableView type from group to plain.

Resources