App display does not fill iPad screen - xcode

I'm converting an app that I made for iPhone to be used on iPad. Using constraints on the Xcode 6 storyboard is killing me right now.
With my rep score I can't post an image of what I'm getting, but basically even when I set the constraints and the placement of the object (a UIView) on a storyboard sized for iPad, all the objects on the viewController fill only the top/left area of the screen.
What's the best way to handle this?

-- when you change size of view, other view will be auto change to {0,0,0,0}, isn't ?
but it doesn't change in the right panel.
it is your storeboard files some settings have some wrong.
Demo test link http://www.cocoachina.com/bbs/job.php?action=download&aid=80409
Check for those points:
hope this can help you.

Related

Swift background disproportionate in Storyboard

I have a problem with a background image in a controller .
I set an image directly from a storyboard with ImageView , but this seems to be disproportionate and grainy on the storyboard , but then when you launch the app screen appears proportionate.
That makes me hard to graphic design because I see the storyboard no depreciation corresponding to reality
What can be ?
I hope I was clear enough
thanks
Go on your storyboard, select one of your view controller
Right panel > Size inspector > Select freeform in simulated size
Put the size you want
Note with autolayout you are designing "responsive" interface, that's why the screen is bigger because it's could be an interface which can fit both an iPad screen or Iphone, also a question of landscape/not-landscape.
I don't recommend to change this mode then, or only if you are building an app for a specific screen only.
Also, by default the layout is set to Any Width / Any Height that's correspond to all layouts possible but you can change this in the bottom of the middle panel.

Xcode 6.1.1 StoryBoard Size

Good morning,
I am new to Xcode and am learning to create iOS applications.
When I open a single view application and click on main.storyboard, my size is w Any h Any. When I decide to add a label and run the iOS simulator (iPhone 6 or iPhone 5S), the label appears somewhere else.
This is really frustrating and I have tried many approaches such as disabling use size classes, changing the storyboard size by clicking the w Any h Any button, and even messing with the constraints as mentioned here: Xcode 6 Storyboard the wrong size?
I am really trying to continue with this but I have seem to hit a wall for a couple of hours now, if someone could shed some light to why I am messing this up, that would be amazing.
EDIT: How can I get it to be a "normal" sized iPhone, such as the iPhone 5s?
You can click on the w Any h Any to change it to a normal iphone size by mousing over the squares and reading which devices they encompass.
You are going to have to use constraints though in order to make anything go where you want it to, I really didn't want to learn them but I couldn't do without them now: they are very useful.
EDIT
Constraints are simple in concept but can be tricky in certain situations:
For any view to have valid constraints that work correctly, it needs to know what the size of the view is and its position in it's "parent container" which is just whatever view or viewController it is inside of.
The little |-O-| shaped button and its neighboring buttons next to "w Any h Any" give you options for positioning and sizing the view. So if you click on a view and then click on that square button in the middle, check the width, height boxes and click the left and top lines in that top positioning thing with sizes in it like so:
Then click on add 4 constraints. You will notice blue lines appear around your view saying that it can properly put it where it needs to go when running the app. If there is any orange or red that means there are conflicting constraints on the view.
Sometimes that can mean you put to many constraints (more than you need) and you just need to delete them in size inspector tab. But more often than not, if that doesn't fix it, I've noticed that I usually have a neighboring view that isn't properly "constrained" and is actually the cause for the other views problems.
How can I get it to be a "normal" sized iPhone, such as the iPhone 5s
You don't. The view controller's main view will be resized correctly when the app runs (on a device or in the simulator), as appropriate for the device type and other aspects of its surroundings.
Your job is to use auto layout so that no matter how the view is resized, its subviews (labels and buttons and so forth) will look good. That is what auto layout is for - it's to help you compensate for the fact that you have no idea what the real size of this view will be at runtime.

Xcode 6 Manual UIView Resize Issue

Ok, so I have multiple views on one of my screens. UIButtons, UIImageViews, UIViews, and a Container View.
Anytime I go to resize a view, it seems that one view will be auto resized to 0. When I resize via the actual inspector, no issues. It is just manual resizing on the storyboard itself.
I am not sure what is going on, has anyone experienced this?
>Check a video here<
Thanks in advance.

iPhone 4/iPhone 5 User Interface compatibility in MonoTouch

I am hoping someone can help me out with this one. I have an app that I am trying to update to get rid of the letterbox look when running on iPhone 5. I have added a Default-568h#2x.png to the project and the application seems to scale correctly. The splash screen on either device looks correct, however I have a toolbar on my "Home" screen that I can't seem to get in the right place. If I get it right for 5, I can't see it on 4s, and if I get it right for 4s, it is very low on 5.
Am I missing something? Do I need to manually move the toolbar that is at the top? And will I need to move all the controls around on all of the screens in the app?
Any advice is appreciated!
Thanks
Here are some tips on using Interface Builder to handle resizing.
Take advantage of the Simulated Metrics in Interface Builder, as shown here:
To do so, select your top-level View, and open the Attribute Inspector. Then, you can select different sizes and orientations to see how your view responds.
Select the Autosizing options as shown here:
In your case, you want a fixed margin above, but a flexible margin below. Note that this is the opposite of the default for a toolbar because the iOS convention is for toolbars to be at the bottom of the view.
Realize that resizing due to rotation and different screen sizes can often be handled the same way. (Thus, if you handle portrait and landscape orientations using Autosizing, iPhone5 layout usually takes care of itself.)

Why do my views in storyboard vary in height / not show the navigation bar?

I have quite a large storyboard with many views, a lot of them do not display at the correct size or even have a navigation bar. Is this some kind of bug in XCode?, because they all look fine when simulated or built to a device.
Thanks
I have faced it lot of time below solution works every time.
Try This One:
1. Select the StoryBoard you are facing problem
2. Goto Attributes Inspector -> Simulated Metrics -> Size -> There are four options(default is inferred)
3.Select or switch between options other then default(repeat it twice or more if needed) then resize your views and controls to fit your selected screen size.
According to me this happens because:
Sometimes inferred (size) behaves as if its an 3.5 retina screen but our storyboard size is retina 4 full screen or vice-versa
Best Practice to avoid such problems :
When you start working with storyboard first select appropriate size you want to work with (3.5 or 4 full screen) then only you should set your views or controls.
I had this issue when embedding Container Views into the same View Controller.
With three Container Views embedded I found that Xcode auto-sized two of them when I selected "Apply Retina X.X Form Factor" but the size of the third was left untouched.
Solution
In the parent View Controller the third Container Viewer was missing constraints. Adding those constraints got every thing straight. (I also had to size the Container View to fill its parent Controller Viewer)
This is a very simple step. After selecting View Controller, go into your Simulated Metrics and select size and place it on iPhone 4-inch and then select Orientation and place it to Portrait and there you have it. Your main storyboard metrics are fixed. Again this is very important to know that this will not mess up anything your height or width in your project

Resources