UITableViewCell Constraint in iOS 8 not working in iOS7 - uitableview

I have used the Autolayout in iOS 7 and it works correctly without any problems but regarding to iOS8 it isn't worked at all .
Can i used the same UITableViewCell constraint for iOS7 and iOS 8 ?

I have experienced, that on iOS 8 some things just don't work as they did in iOS 7. For example, I had a Tableview with a few custom cells. Everything worked fine in the iOS 8 simulator, but on a iOS 7 device the tableview was always empty and the cellForRowAtIndexPath function was never called. It turned out to be a problem with Autolayout. Everything I had to do was to set correct constraints for the whole tableview, not just the cells. So my advice would be to check ALL constraints used in your view, not just the ones you think could be messed up.

Related

UITableViewAutomaticDimension not working on Xcode 11 and iOS 13 with trait variations

I have view in xib that registered to tableView and calculate height through UITableViewAutomaticDimension. And all worked fine before update to Xcode 11 and iOS 13, now height small and incorrect.
What I noticed, if I remove all constraints trait variations it appears to work again. But if I add at least one trait variation for constraints(no matter horizontal or vertical) As on this image
Even with two checks, it breaks. But such variation working good, not breaks layout
.
Maybe bug in Xcode or something. Has anyone encountered this problem?

XCode 8 XIB Autoresizing issue

I have older code, written for iOS 6. I need to implement it for iOS 10 with some new SDK. I have some XIB's. Everything was working perfectly when I was changing them. But in one XIB, when I try to change Image in my Interface Builder of UIImageView, whole layout just collapses. I have 2 views, called TopBar and Content. When I try to change just background image of TobBar View, Content view just collapses, actually, TableView in Content View just goes off the screen on the right and you can scroll to right to see content of a cell. Everything is shifting in my Content View to the right. In my XIB, image view is shifted, TableView is so big to the right. When I place everything as it was, sam thing is happening after build. I have been reading for some time now, and changing from XCode 8 to XCode 7.x in my IB does not work, layoutIfNeeded does not work. Does anyone knows what's the problem? Code still uses Autoresizing masks.
Anyone in same situation as me: in XCode 7 it is working. So, I draw in XCode 7, and build in XCode 8, but I need to build for like 8 times, when it fixes itself. I have reported a bug to Apple.

UITableViewCell's height different on iOS 8 (compared to iOS 7)

Something is troubling me. I have a UITableView with cells that contain images. When using the iOS 7 simulator, the images gets constrained to the cell's height. When I tested it on the iOS 8 simulator, the cell expanded to the height of the image, and it is kinda buggy. Buggy because the height may change back to the height which appeared under iOS 7. Can someone kindly enlighten me please =D
My app is built using iOS 7 by the way.
Seems like all I can do for now is to use this:
self.tableView.rowHeight = 44.0;
Do let me know if any of you geniuses out there got something better =D

Interface cut jumps on load in simulator and iOS 8, but not on iOS 7 real device

I have a problem with my interface on iOS 8 GM(real 5s) and iOS 8 Simulator(iPhone 5, 5s, 6 and 6+).
When I'm testing the app and I load my custom player view controller, the interface make a jump when interface is shown. And when testing on real app, instead of jump MPVolumeView is appearing in a some kind of expanding animation.
However, the problem is not there when I'm testing it on iOS 7 iPhone(the real one).
Also I've found out that if I remove all the constraints from the view that is loaded the jump issue disappears.
May it be a bug in iOS 8 behavior? Or it is some new behavior that I'm getting wrong?
EDIT: Testing on iOS 7 simulator definitely makes it look like it's some new behavior of iOS 8(on iOS 7 it works fine).
Here is the video for better understanding of the problem:
(black bar is MPVolumeView)
http://www.youtube.com/watch?v=gfc3n2syqo4
Okay, I've figured it out.
For some reason, if you set constraint from the view to the bottom layout guide, the view will jump on load. Don't know if this is expected behavior, I think I will post bug report for this one.
TL;DR remove bottom layout guide constraint and use other constraints.

Xcode 5.1 iOS 7.1 problems with cells at UITableView

I think I have found serious bug in new release of Xcode 5.1 after update my cells start to disappeare when I scroll to the bottom.
When I press on them couple of them
When I scroll after that to the top everything is fine and this problem is only on iOS 7.1. At iOS 7.0.3 everything is works fine.
I have found a little hack to make it work at iOS 7.1 To do that I have download old version of Xcode(5.0.2) and make build of application that I have install at my device with iOS 7.1 in this case everything is works fine too. So I think it's some bug in Xcode 5.1
Im having the exact same problem with an app i was finalizing and things started to go crazy with the table views (all 3) right after the update..
found the solution
iOS 7.1 beta5 tableviewcell height showing objects outside it's range
add the following to your cell
cell.clipsToBounds =YES;
I also had the same problem when I opened my project in Xcode 5.1 but I solved it in Interface Builder (Storyboard).
Click on the Table View Cell (not the Content View or Table View).
In the Inspector, check 'Clip Subviews'.
Do the same for all the other Table View Cells of the Table View.

Resources