Autolayout differences between iOS 8 and iOS 9 - ios

If I run the same code on iOS 8 and iOS 9 the layout comes out differently. The icon and label should be even.
I'm using a custom font so I'd assume the font size / height is the same in both OSes. If I adjust the spacing constraint to be right on 9 it shows up wrong on 8.
Any ideas?
Update
Here is the existing constraint:

Related

Why autolayout behaves different in iOS 7 and iOS 8?

For example: I have set in a storyboard scene a vertical space constraint from de bottom of a UIButton to the bottom of the superview with a constant of 20. When running in an iOS 8 device, this is correctly shown, but when running in an iOS 7 device, it looks like this constant becomes higher and the button is shown upper in the screen... I don't understand why this happens, since autolayout is supposed to be available since iOS 7.
Any help? I don`t know how to handle this.
Thanks in advance
One of new things in iOS 8 is the Layout Margin. Layout Margin is a new property available in UIView for iOS 8. So, any objects inherit from UIView will have this property. If you are developing the app for both iOS 7 and iOS 8, you should not use Layout Margin (or use layout margin in a smart way).
So, if you have any constraints related to layout margin and you didn’t do a proper check before launching the app on iOS 7 devices, the app might crash or the arrangement of the objects might be out of order.
Whenever you are trying to add new constraints from the storyboard in XCode 6, “Constrain to Margins” is ticked by default. The meaning of this selection is to add constraints with the new property in iOS 8.
If the deployment target of your app is iOS 7 and above and any of your constraints have this layout margin, the XCode will complain with the warning “Layout attributes relative to the layout margin on iOS prior to 8.0″.
If you are developing the app for both iOS 7 and 8, it is best to “Untick” the Constrain to Margins.
Reference: you should also check this great tutorial

iOS auto layout ios7 vs ios8

What exactly are the improvements in auto layout ios 7 and ios 8?
My app is working fine in ios 8 but has different behavior in ios7. Constraints are breaking in ios 7 after loading views multiple times.
I want to know what are the things that ios 8 now handles which ios7 autolayout cannot do before.
Like how iOS 7 and iOS 8 handles "manually added subviews" with autoresizing masks ( Flexible width and Flexible height )
Thanks!!
**im not using size classes and relative to margin
Working with autolayout in iOS 7 and iOS 8 is the same. Adaptive layout is really just an umbrella term for all the new layout tools in Xcode 6 and iOS 8-- one of which being Autolayout. Though autolayout isn't new, it's still a part of the adaptive layout toolset, and it's much improved in iOS 8. Other adaptive layout tools include Size Classes and Adaptive Fonts. I recommend reading this Ray Wenderlich article that has some examples of the new tools: http://www.raywenderlich.com/83276/beginning-adaptive-layout-tutorial
For me, I fixed my ios7 issues by these:
avoid constraints to margin and size classes,
avoid constraints with "aspect ratio"
avoid proportional height and width which conflicts with some push/pop/present dismiss animation in ios 7

Does iOS 7 have issues with custom fonts + autolayout constraints?

I've spent many days trying to find out, why I had quite random autoLayout constraints errors on iOS 7 (no problems on iOS 8 whatsoever).
Now it seems to me the problem could be when using custom fonts:
UILabel with a custom font inside a container and pinned to the container with 0-0-0-0 (top, left, right, bottom)
Autolayout-constraints error was always about some vertical alignment issues.
So am I right about my assumption (NOTE: no issues on iOS 8)?

IOS 8 off center

I am trying to write a minimal program, IOS 8 using XCODE 6.1, I add a label and set it to centre for both horizontal and vertical. But it appears off-centre when I run it, any idea?

Interface Builder, frame changes on IOS 6

I have a xib file that support IOS 6 and 7.
The problem is when i selected view as IOS 6 the frame from IOS 7 change, and vice versa.
Here is a screenshot, previewing the IOS 6.1.
I adjust the frame to (0, -3, 255, 85) and when adjust the frame using view as IOS 7 the frame becomes:
(-345,894,0,0).
When i adjust the frame using view as IOS 6.1 and early the frame changes for IOS 7.
I just want to use the same frame in both IOS version.
Some informations that may be relevant:
Was an existing project build for IOS 5.1 and later, then i update the project to support IOS 7.
When i made the update some views (include this one) have their frame changed to positions that does not make any sense and size their size set (0,0).
First i think was an interface builder issue preview issue, but i tested on devices with IOS 6 and 7 and the results are the same from the preview
Thanks in advanced!
When you assign bottom margin & top margin in Autoresizing tab, iOS 7 gets confused & produces strange effects.
I faced the same problem, & i solved it using height stretch. Refer image.
Use 'iOS 6/7 deltas' fields to adjust design element(s) position on your controller for different iOS.
You should setup your project (setup how UI view) for one of iOS versions (6.1 or earlier/7.0 or later) and then adjust interface by deltas to other version.
You also can use new preview mode to see difference between two operation systems on one screen.
Here is link to APPLE iOS 7 transition guide - https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/TransitionGuide/SupportingEarlieriOS.html#//apple_ref/doc/uid/TP40013174-CH14-SW1
First set your view size as none and then Set your frame using view as iOS 6.1 and earlier. Now test in iOS 6 and 7. It will automatically resize your view frame.

Resources