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

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.

Related

iOS tableview appearing empty in UiBuilder

I'm using a long tableview. All of the cells are visible when I run the simulation but in the UIBuilder, only the top visible cells are showing. When I scroll further down through the table in UIBuilder, the cells are blank. This has only been an issue since I updated Xcode. Has anyone run into this issue before? I'm currently using Xcode version 7.1.1
This is a recent bug in interface builder. As a work around, change the size of the view controller in simulated metrics from inferred to freeform and increase the height until a cells render their content.

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

UITableView rendering differences between iOS 6 and iOS 8

I am in the process of updating an old app from XCode 4.6 to 6.3 and have run into a difference in how my custom table view cells are rendered between iOS 6 and iOS 8 (well the change can be seen in iOS 7 as well).
Here are 2 screen shots from Xcode 4.6/iOS 6.1 simulator:
Here are the equivalent Xcode 6.3/iOS 8.1 simulator:
(As background, the Preferences screen is a grouped UITableView with 3 groups and 1 element per group. The Units screen is a single sectioned UITableView with 3 elements. And the "Note" on the Units image is just a plain view)
The difference I didn't expect (and don't like) is that in iOS 8, the custom table cells have expanded horizontally to cover the entire width of the screen, and have also lost their rounded corners.
I have been looking around to see if/how I can make the iOS 8.1 version look more like the 6.1 version, but so far have failed.
Is it possible to easily get back the layout I want? And if so, where should I be looking to make changes?
One possible approach is to set tableView.backgroundColor and your custom cell's contentView.backgroundColor to clearColor (it can be done via the interface builder as well). Then add a background view to your custom cell. You can give it rounded corners and add space around it.
This is what it looks like at runtime (the blue background belongs to the view behind a tableView):
This is more tricky though when we deal with a group of cells on your right screenshot. There the first cell has to have rounded corners at the top, the last one has to have rounded corners at the bottom, and the middle one shouldn't have rounded corners. I guess, it can be done (you could take indexPath into account when configuring the cell), but it takes a bit more work.
P.S. I'm sorry for the size of images. I don't know how to restrict it.

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.

iOS 7 tableview no longer auto scrolling when keybaord appears

I am working on an app which I have just released an iOS7 version of. In the app I have a table view that contains text feilds in each cell. The problem is that when I tab to edit a feild that is near the bottom of the screen the keyboard appears and I cant see what I'm typing. I fixed this in iOS6 by simple listening for the event of the keybaord appearing and changing the size of the tableview so that it no longer extended to the bottom of the screen, but instead only reached to the top of they keyboar. The table view would then "automatically" scroll so that the cell was visable. This worked fine in iOS6 but as soon as I made the switch to iOS7 this no longer works... it no longer "automatically scrolls" when I change the size of the table. Does anyone know if there is a property that I need to set or something to "re-enable" this functionality?

Resources