Differences between iOS 7 to iOS 7.1 - ios

Just updated my Xcode to 5.1 and the iPhone i work on to the 7.1.0.
A lot of apps that I have made, I have to redesign for the new iOS, because whenever you used a UINavigation bar, the Y point of your UITableView in UITableViewController would be the actual screen coordinate, so you would have to add 64 every time, or UINavigationBar.size.height.
Now this is changed, there is no need to add 64, the new 0 point is just after the navigation bar.
Did anyone notice any ether differences?
And does anyone now how will the changes effect the users how did not update to 7.1.0?

I ran into the same issue and found that including
[self.navigationController.navigationBar setTranslucent:NO];
helped to resolve my issue.
I noticed that if I brought my tables and data up to the top in the xib file to match how 7.1 handles it...it messed it up for 7.0. Including the code above while having the content at the top of the xib file proved to work for both 7.0 and 7.1.
Hope that helps,
Wes

Related

Navigation controller causing auto-layout issues on screens in Xcode 8

This has happened on a couple of apps I've been working on, and I believe it has something to do with Navigation bars or Tab bars. I'll work on another screen and be messing with the code and then I'll randomly scroll across the Storyboard and see that all the constraints have suddenly changed values and some items have expanded to 1000 x 1000.
Has anyone experienced this before, and know what is causing it? It's happened quite a few times to me now and it's obviously annoying to reset them each time.
Since you updated your Xcode to 8, you may need to update frames in the whole scene (once).
If you do that each time and it doesn't help, for me changing size of the storyboard helped. For example change from iPhone SE to iPhone 6 and vice-versa.
Now in Xcode 8.1 Beta version, there is a shortcut button for this.
Just select the problematic view's superview (containing mentioned constraints), and click this update frames button:

The issue of Interface Builder in Xcode 8

My storyboards are created in Xcode 7. After I installed Xcode 8, all of them are constantly messed up. When I open one of them, Xcode asks me to select a device (which is a nice new feature). But then it never adjusts views' frames, so I must press "All View: Update Frames" infinite amount of times. And even this doesn't fix all "misplaced" views.
Anybody knows how to fight this problem? Or the only option is to pray that Apple fixes it at some point?
UPDATE 1
It happens every time I open IB, even if I've fixed frames previously.
UPDATE 2
When my colleague fixes same storyboards on his computer, changes stay. No idea what makes my Xcode so special.
I figured out the following workaround
First, set width and height for your view to the values it will calculate on selected device in your storyboard, then preserve superview margins.
This worked for me
Xcode 8.0 has the bug, that it does not save the rects from the storyboard xml-s. So if you fix misplaced views in Xcode 8.0, the problem is gone for as long as the storyboard stays in RAM. When the storyboard is closed and re-read from a file, the issue appears again. (Actually Xcode 7.0 had exactly the same problem in the beginning.)
Xcode 8.1 beta 3 (the most recent version at the time of this writing) fixes this issue:
frames are not 1000x1000, but they stay as they were.

Xcode 8 Storyboard warnings for Navigation Bar width [duplicate]

This question already has answers here:
Warning frame for "Navigation bar" will be different at run time appears in Xcode 8 Swift 3
(14 answers)
Closed 6 years ago.
I am getting constraint warnings for my Navigation Bar's for each of my Navigation Controllers in each of my storyboards in Xcode 8.
To get rid of the warning I set the Navigation Controller's Simulated Metrics->Top Bar setting from Inferred to None and then back again, and the warning goes away. Until the next time the storyboard is opened, then the warnings come back.
My storyboard has the iPhone SE display setting, and the navigation bar's are not Translucent.
Changing the device preview from iPhone SE also removes the warning.
Xcode 8 has some serious bugs in Interface Builder: as well as this one, it has a nasty habit of random-seeming frame changes to all sorts of views - in my Main.storyboard, it decided to make some keyboard input accessory views 1,000 by 1,000 points, and everything inside it had a frame of {0,0} - {1000,1000}.
Did the same thing to various UITableViewCells, but not all of them.
Changing everything back took ages, cleaned the build folder and recompiled, but the problem came back straight away as soon as the storyboard was opened.
I had to uninstall 8 and go back to 7.3.1,
I filed a radar, saw other people with the same problem on the dev forums.
I encountered with the same problem. I am not sure that is solution or not but I just changed the Simulated Metrics size which is page size from freeform to the Page Sheet and warning dissappeard
Regarding the issues of Xcode automatically moving some views/subviews to {0, 0, 1000, 1000} frame bug, which is related to main question:
I had the same problem. Make sure to use Xcode 8.1 now as this problem is fixed in that version.
Xcode 8.1 Release notes
https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html
Radars related : 28221021, 28244619
Update - Pointing the explicit frame bug solved on Xcode 8.1

Weird space in iOS7

I just ran a demo app on iOS 7 target, this is what I get:
I'm using a storyboard and it looks well in iOS8. Constraints are correct.
I already checked e.g.
UITableView is starting with an offset in iOS 7
but the issue in this case is the whole thing, incl. status bar has the offset, no idea what this is. I played around with the layout settings of the view controller in the storyboard without any effect.
I also created a brand new (single view) project, ran it without changing anything, got the same issue. Don't know what can go wrong in a new project concerning autolayout as I can't set any constraints in the root view controller's view...
Any ideas?
Thanks in advance.
Try adding a "Default-568h#2x.png" launch screen to keep your iOS 7 device from running the app in Letterbox mode.
What Apple really wants you to do is use Auto-layout (see point 1 in the linked blog), which is what I suspect your demo app isn't doing.

In xcode 6.1, interface builder deleting ui elements

I have a view with some tableviews and some collection views and also some buttons and labels.
I'm not sure if this is new with Xcode 6.1 because I have not worked on the ui aspect of this project for some time. However, when I try to resize just about anything in the view, my tableviews and collection views, and possibly some other elements I am not noticing, get deleted. Specifically, it seems their frame or rect propertied get deleted.
To be clear, this only occurs when I attempt to resize the element by dragging the sides in interface builder. If I resize them by changing the numbers directly either in the IB sidebar or in the xml, this does not happen.
I'm wondering if this is a bug in Xcode or if I have done something to cause this behavior which I can change.
Thanks!
I acheived a fix, at least for this project by turning off auto layout in "show the file inspector" -> "interface builder document"
I have never used this feature in the past so I do not know if it was on in the past but I am wondering if the new Xcode version turns it on by default where the others left it off.
It may also be possible that it has always been on but there is a bug in the feature in the new version.
This fixed the issue for me, at least in this particular project and at least for now. I hope others find this useful.
From here it looks like a bug in Xcode 6.1.
I created a clean project and the behaviour is the same on my machine:
https://github.com/nasht/Xcode6ConstraintTest.git
Resizing one view makes others disappear. Changing a layout constraint from a = to <= or >= also seems to do it.
I've raised a bug with Apple. Suggest you do the same.
workaround: You can install xcode 6.01 and use interface builder from there. You can still compile and run your code using xcode 6.1 if you're relying on xcode 6.1 specific features. (you'll need to rename your xcode.app so you can run both instances. ) It's ugly, but it works.
I found that it's fixed on the next version of xcode (6.1.1)
same problem, yosemit and xocde 6.1. I can resize some view only if i disable autolayout.
I think I ran into this 'problem'. I believe this was because one of the constraints I had was not setup correctly.
What OS X Version are you on? I updated to Yosemite today and 6.1 along with it. When I would resize a label my other elements were not getting deleted but instead getting resized and repositioned. The width / height would change to 0,0 and the x / y would change to 0,0 as well.
I was noticing other issues with Yosemite so went ahead and did a time capsule restore back to Mavericks and Xcode 6.0
I had the same problem in universal app; iphone works fine and the ipad doesnt work.
I'm using xCode 6.1 and OSX Yosemite
My app supports iOS7 and iOS8 and i had the same problem on iOS7 on iPad version only
Fix:
So i fixed it by setting Simulated Metrics in interface builder by
Size = iPad Full Screen and Orientation by Landscape or Portrait
I have got the same kind of problem with Xcode 6.1 and Yosemite :
I have created a view that I have added to the main view, so it appears like a sub view in the View Controller Scene.
Then I resize this subview to 320 x 568. My program works. It corresponds to the program dropit of Stanford CS193P Lecture 9.
I save the project, close it and reopen it : the subview has its width and height set to 0 !
I tried to open the project dropit of Lecture 8 that is quite the same, which was working before (I think in Xcode 6) and same problem ! First I thought that tapping (related to the subview) was not working but found out that tapping was not working because I was tapping on a subview which has its width and height set to 0 !
I have reset the size class wCompact hAny to which all the UIElements are added. and got corrected.

Resources