Story Board issue after upgrading to Xcode 5 and ios 7 - ipad

I could not figure out why this is happening.I searched here but could not find any answer for this.
The problem is I developed some screens using StoryBoard in xcode 4 and ios 6 but now I upgraded to xcode 5 and ios 7.But after upgrading all my labels,text fields have changed dimensions.Their x,y co-ordinates have changed along with width and height.They all have same x,y co-ordinates(0,758) and width,height as 0,0.
I can bring them back manually editing but there are too many fields to do so.
Is there anyway to do it easily?

Recommendation
From your problem description it sounds like you're seeing the effects of the deep system changes in iOS7.
To verify that you are not seeing any bugs please select your storyboard or xib file (this works on both) and open the assistant editor.
Next choose the Preview as the assistant editor. This will show you the storyboard layout as it will look on your device.
Note the menu on the lower right will show three things:
The version of iOS being previewed
A rotation control to show the controls in different orientations
A height control to show how the view will look at 3.5/4.0 heights
iOS7 Preview
iOS6 Preview
Please keep in mind that the iOS7 control sizes are different from all other prior versions of iOS so they will never line up precisely. Use of auto layout will need to be re-examined if your app is highly complex: There are two options: Review the auto layout guide (here) or turn it off (in the file attributes inspector) and use the old springs and struts (autosizing).
I recommend a thorough reading of Apple's transition guide (link) to make sure you understand the impact of the changes to the UI controls.
Techtopia has a good article on iOS7 Auto Layout which can be very useful in managing the sizing and appearance of UI Controls (link).
Apple has a sample app that I think is worth examining called UICatalog (link). I recommend downloading the app and running it on your simulator to see how the new controls will look. Note that the sample does not have auto layout constraints active, if you choose to continue using auto layout you may want to consider defining your layout with the Visual Formatting Language (link).
Other things to consider
There were some bugs with the early build of storyboard in Xcode 5
and auto layout was changed significantly, please make sure you
download the absolute latest version of Xcode.
You could try cut and paste the objects in Xcode.
You should verify that the auto layout setting is consistent between
versions (either on/off in the file inspector).
Check that your auto layout constraints are not generating a warning
or error in Xcode. If they are you will need to Update All
Constraints.
Make sure you have git turned on before starting so you can rollback
your changes to a known state.
Hope some of these suggestions will be helpful.

Related

How to use Safe Area Layout Guide without Autolayout?

I would like to compact my iOS app also in iPhone X. This iOS app developed using autoresizing and deployment target is iOS8.
I had chosen my viewcontroller in storyboard.Then I tried to check Use Safe Area Layout Guide but it automatically appear check mark on Autolayout.Please go through the image.I want to compact iPhone X design of my app without autolayout.How to solve this issue?
You can't use Safe Area Layout without Auto Layout
Look at this Apple Document:
safeAreaLayoutGuide is member/instance of UILayoutGuide class.
And UILayoutGuide: is a rectangular area that can interact with Auto Layout.
So, you must enable auto layout if you want to use Safe Area Insets.
I think, there is no way.
Here is more detail about Safe Area of Xcode 9
Well, I have faced same situation where my old app which was made with Auto Resize thing and need to update with make it compatible for iPhone X, so what I had done so far is to adding splash screen for iPhone X, the following image will give you an idea to how to do this.
After doing that my app now compatible with iPhone X and i have to have add some new condition where design got disrupted. You can try this. hopefully it may help you.
Thanks

Xcode8 Controllers are Grey which are designed in Xcode 7 with size classes

I am making my iOS Application Compatible with iPad.I have designed the UI of my Application with Xcode 7 with size classes which is more specifically designed for iPhone, Now i have to upgrade it to support iPad also.
Now with Xcode 8 when i select iPad from Storyboard with Device Pan then most of the controller are Greyed i.e. those controllers are not showing on iPad on the device also and on the Storyboard also. Please check the screenshot for that
I know the reason why they greyed out, because they are designed with size classes for a different size.
Now my question is, is it possible somehow to use this controller for iPad without Redesigning the UI and updating the Auto layouts, as of now i am not seeing any way to make this controllers available for iPad.
Also i have tried with a way but i think that will be very long, I have to delete this controllers and then add it back and set the layouts again.
Also another way would be design separate storyboard.
So please suggest me what will be a better solution to overcome from this.
Thanks
Even after compatibility conversion to Xcode 8, if still it doesn't seem to work, then you need to check if there are any leftovers like below:
If you want to make sure it works with any width and height, find the constraint:
and remove it by clicking on the x, leaving only installed checked:
That should solve it for Xcode 8.

How to resolve Autolayout issues after updating to Xcode 8.1

I have designed user interface in storyboard in Xcode 7 its working fine when i updated Xcode 8.1 and opened the storyboard the result is below.
I don't know what apple actually doing with this, When ever new update came i struggling on this kind of issue. Can some one guide me how to resolve this?
Thanks
Click on the red button that shows the problems, and see what's wrong, and fix them. Very often you just fix the frames of your views. And then you tap on the various device sizes and check if your layout works with every size.
They did make changes with new xcode 8.0, but I believe its easier then ever.
The concept is same behind only few changes.
Like before you need to do update frames, but now they make it easy so you can view a live preview of your layout without going into preview in show assistant editor.
Just click on device button and it automatically updates frames and shows you your layout.
For more information see: A Beginner’s Guide to Auto Layout with Xcode 8

iOS simulator screen size

It is just 2days to start iOS programming.
So I'm very beginner in this area.
<--This image is in iOS simulator. As you see right part is cropped.
<--This image is original UI.
I don't know why some parts have gone.
I am using MacBook Pro 2011 with Yosemite OS and brand-new XCode.
I tried cmd+1, cmd+2, cmd+3.
Please help me.
Thank you in advance.
Go to file inspector and uncheck the "use size classes" option, this is due to newly introduced size class feature to support all devices in ios 8
The new user interface works with all sizes of devices at once. The default size is 600x600 as you are seeing. When you simulate, is uses autolayout and constraints to arrange objects for the desired screen, aka an iPhone.
If you want to place the label in the center of the screen, Ctrl+drag from the label to the background, release mouse and buttons and the constraints options will appear. Click Center Horizontally in Container and Center Vertically in Container.
Run again. It will be centered.
Best regards
Select your view controller and find size inspector, Change fixed to freeform and give whatever size you want
I had a closely related question, and Mehul Thakkar's answer helped me to get where I needed to be, but I'm adding a new answer to flesh out both the question and answer a bit.
I was working on an iPhone app for iOS 8 that was shrinking the interface on larger screens to the size of the iPhone 4s. I don't use storyboards or Interface Builder nib/xib files at all, and do everything programmatically; for iOS 7 and earlier, I didn't bother making an explicit launch screen as my UI was simple enough that it loaded very quickly and a launch screen wasn't necessary.
Anyway, after finding this page and poking around a bit, it appears that creating a launch screen storyboard or nib/xib is now necessary on iOS 8, if you want your application to run at the correct size? (At least, I couldn't find any other way to coerce Xcode to do it in the project settings or whatnot.)
To do this, I created a new launch screen .xib file, unchecked "Use Size Classes" in the "Interface Builder Document" section of the File Inspector of that .xib file, and set the "Launch Screen File" under the General tab of my target settings to use that .xib. After that, the app ran at full screen size again.
This works for me and I guess I don't mind putting in a few minutes to turn the .xib file into a proper splash screen, but I'd be interested in hearing if there are other/better ways of making things work in iOS 8 and beyond, for those of us who hate our lovely code being tainted by the presence of those nasty storyboards/nibs/xibs...

iOS XCode Storyboard controls moved and now look strange in simulator

I am following the course on iOS through iTunes university and working on the calculator project. I moved the controls on the storyboard to make room for another control at the top. Everything looks fine on the storyboard but when run in the simulator, controls are bunch up, on top of each other, and some are clearly off the top of the simulator screen. This leads to the following very related questions.
How does one move controls around on the storyboard? I went to the size inspector of each control (buttons in my case) and changed the 'Y' value (increased it by 10). I did this for each control. I didn't think about it as I was doing it because as I said, all looks fine on the storyboard. Is there a better way to move controls around? I could not figure out how to grab more than one control at a time and move them. Grabbing all and moving or all but one and moving would have been ideal.
I anticipate someone is going to say, "We need more info. " How do I show the storyboard? Is there a xml file somewhere? How is the storyboard saved? How should I show the results of the simulator?
In general, what the heck is going on? Why would things look so different in the simulator?
Is there a better forum/group to ask newbie questions about iOS programming?
My specs are these:
XCode 4.5.2
Ios simulator versions set to 6.0 and iPhone
Any other info needed? Thanks in advance,
Dave
Try setting your simulated device size to 'freeform' instead of 'inferred'. This screen is a bit smaller so the controls are no longer overlapping. The latest xcode sets it by default to ios6 (screen size of iPhone 5)
edit For a better insight in xcode IDE, please refer to the documentation provided by apple (includes screenshots for clarity)
https://developer.apple.com/library/ios/#documentation/ToolsLanguages/Conceptual/Xcode4UserGuide/000-About_Xcode/about.html#//apple_ref/doc/uid/TP40010215

Resources