Use xcode5 develop ios6 programe, the view's origin Y [duplicate] - ios

This question already has an answer here:
New iOS 7 statusBar leaves a range 20px in apps compiled in Xcode 5 [closed]
(1 answer)
Closed 9 years ago.
I have a app develop under ios6 and does not release for now, yesterday I'm upgrade my xcode to 5, and I'm try use it develop my old app, everything is ok, but some of my controller's base view's origin Y is 0 for now, it means these views are just below the status bar, and navigation bar over it. I don't want to add 44 to all of the controllers base view's frame origin y.
Does someone know about this, or do I needs to switch my xcode to 4

In my opinion you have two options:
1) Install the iOS6.1 SDK into Xcode5. The easiest way to do this is copy the ios6 SDK from Xcode 4 found in: Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/ and paste it in the same place inside Xcode5 app. (See more details here: Is it possible to install iOS 6 SDK on Xcode 5). After that you can use 'Base SDK: iOS6.1'.
2) Make all your navigation controllers opaque instead of translucent. For example in Interface Builder, uncheck the Translucent check box after selecting your navigation bar.

Related

Xcode 10 - iPhone X black bars [duplicate]

This question already has answers here:
Seeing black bars at the top and bottom of the iPhone X Simulator
(11 answers)
Closed 4 years ago.
I have been searching for days now and I am really going crazy.
I have re-openend an old project last edited with xcode 9 (I did not care about the iPhone X screen until now) in my freshly updated Xcode 10.
No matter what I do I can't get my app to use the whole screen for iPhone X.
At first I noticed I was not using safe area layout guide - ok, added it for a test view, still black bars.
I'm using storyboards and have set up a test storyboard with no view controller or something else, only a single view inside the safe area and yellow background. This storyboard I have set to be the main interface.
In project settings I have enabled "Requires full screen".
In Xcode Editor everything looks good:
However, the result in simulator (and also on a friends real iPhone X) is like this:
Is someone able to help? This does NOT happen when I create a new project, but of course I would very much like to avoid using this option as the app is almost completely developed....
Thanks,
Matt
Thanks to rmaddy I changed from launch screen image to storyboard and the problem disappeared... how stupid of me to ignore that while googling.. :)

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

Change UINavbar height from for older apps build using Xcode 5 or older

I've noticed the navigation height for the apps that I started with Xcode5 and older is larger than if i create a new application using Xcode6. Is there a way to change the height of the navigation bar. I can't seem to find a solution.
Thanks.
You need to add launch image assets for the iPhone 6 and iPhone 6 Plus. This is a really good answer on how: Enable Native Resolution on iPhone 6 and 6 Plus

How to make .xib files compatible to both iOS7, iOS6 and earlier [duplicate]

This question already has answers here:
Status bar and navigation bar issue in IOS7
(11 answers)
Closed 9 years ago.
I am using .xib files in my app and I am using xcode5.
If I run my app in iOS6 and earlier, the alignments are missing.
Any one know about this issue?
Do we have to create separate .xib files for iOS7 and iOS6?
EDIT: I turned off Autolayout but under iOS6, the views are still going down by 20 pixels.
If you haven't done so already, turn off AutoLayout in your xib files. Autolayout only came in with iOS 6 and newer iOS versions.
Also, you can preview what XIB files look like between iOS 6 and iOS 7 via a popup menu in the File Inspector:
in iOS7, the app windows starts from y=0px (in iOS6-, it begins at y=20px).
The quickest and easiest way to handle this, (and since you're already using Xcode5), is to switch off Autolayout and utilize the iOS6/7 Delta values for every view.
Basically:
Select every viewController's main view and uncheck "Use Autolayout"
Select every subView (UIButton, UILabel etc), go to the frame setting section
Increase their Y frame values by 20
but it seems you, #SudhakarTharigoppula, don't need to do this step.
...just do the next step
Enter a value of -20 for ΔY
This will start your app by leaving 20px in iOS7 but back in iOS6, the ΔY of -20px will compensate for the extra 20px you had given to every subView.
see: Status bar and navigation bar issue in IOS7

iOS 7 Status Bar mixing in with view [duplicate]

This question already has answers here:
Status bar and navigation bar appear over my view's bounds in iOS 7
(20 answers)
Interface Builder: What are the UIView's Layout iOS 6/7 Deltas for?
(6 answers)
Closed 9 years ago.
I am creating an application that will work in both iOS 6 and iOS 7. I have a view with a header image at the top. In iOS6 it works fine as it doesn't cover or interfere with the status bar at the top of the screen. However, in iOS 7 the view mixes in with the status bar and it looks terrible. I would need to know how to rectify this without it affecting iOS 6?
Select your view containing elements in Interface Builder.
Select Size Inspector tab from right menu.
in iOS 6/7 Deltas, give -20 in Delta-Y and 20 in Delta-height.
NOTE: not applicable using Auto-layouts.

Resources