UIView Retina 4 doesn't work - ios

I'm trying to update my application to catter for iPhone 5 4 inch retina screen.
I'm using custom nibs for different screen size versions as I want to show something different and make use of bigger screen.
I've created another nib and I'm properly calling it from initWithNib method.
This is what I'm getting:
It's only a start, I've setted background color of the View to black, but as you can see simiulator isn't scalling the view up. I don't know why. In IB there is 4 Retina View type selected. The dimensions are ok. I've checked everything I though of and still the same result.
Any ideas?
UPDATE
Here are my settings:

In IB do you have anything set in the Simulated Metrics panel for top bar or bottom bar as these will cause the view to shrink accordingly?

Ok... I was just setting the frame in my app delegate and it was causing this issue.
I need to look at my code more :)

Related

Autolayout on preview and simulator looks different

Autolayout for landscape mode isn't working.
Here's what I see in storyboard (preview):
https://i.snag.gy/KZENBG.jpg
And here's simulator:
https://i.snag.gy/4EPsH8.jpg
As you can see, toolbar is disappearing to somewhere off the screen. I've tried both Top Space to Superview = Standart value and Top Space to Top Layout Guide = Standart value in toolbar's contraints, but got no result.
P.S. In the portrait mode everything works good.
First of all change device in preview and set it to iPhone 5 and then check looking perfect or not.If not then try to set from Size inspector from Utility area.
If this doesn't work then try this.
Delete Derived data of your project.Then run again.
Derived Data located at
~/Library/Developer/Xcode/DerivedData/(your app data)

Limit AutoresizingMask height stretch

I made this screen
Screen on iPhone 4s(9.3)
It looks fine on that device, however when i test this same screen with iPhone6(9.3) it looks like this. Since i cannot post more than 2 links, i merged the third image with the second one
Screen on iPhone 6(9.3) with the Third Image
As you can see, that gray view, doesn't fill the white space beetwen that same gray view and the first bottom button(lojas). Notice that i don't have the autoresizing height stretch on(that vertical arrow inside the blocks). If i turn that on, this happens
Third Image inside the Second Image
See that, the gray view goes over the buttons, i don't want that.
My question is, how can i solve this? Is there a way to make the gray view stop above the Lojas Buttom at the bottom? Thanks for your time!
OBS: I CANNOT use autolayout.
EDIT: Got the problem solved
I just changed the View as option in Interface Builder, changed it to 7.0 and later, so it gave me the "real appareance" of the app.
I changed the View as option inside the Interface Builder so i could see how the app really look like and set the iOS Deltas to 0, made the changes based on that.

XCode can't fix landscape orientation layout in storyboard

I have a simple linear chain of UIViewControllers.
The first one has a show segue to a NavigationViewController, then it goes on the same way with all the others.
When I switch from wCompact-hRegular to wRegular-hCompact to fix the landscape layouts the first viewcontroller doesn't allow me to do anything. The tree diagram at the left side of the storyboard screen shows the views but they are not written in black. They are transparent. Even if I select them and put the coordinates or dimensions nothing happens. There are only a button and a label. Others Controllers are all ok, they can be fixed. What is happening to the first one?
With XCode 6 you can add views, that are only visible in the selected size class (f.e. Compact + Compact). When you change to a different size class the views are disabled. To fix this navigate to the attributes inspector and select installed for any class sizes.

Is there a way to view a storyboard scene without running the app?

Im working on an app with a viewcontroller buried deep inside a drill down. Im working with autolayout and would like to view my changes without having to go thru the rest of the app processes.
is there a way to view what a scene will look like onscreen without having to run the entire app?
There is a menu option called simulate document. Unfortunately, newer versions of Xcode no longer have this available for iOS apps, OSX only.
If you only want to see the effect of changing between 3.5inch and 4inch phones, or orientation changes, you can change the simulated metrics on the storyboard. This will show you how your ui elements will lay themselves out based on your autolayout settings. Anything you are doing in your code in your view controller won't take effect since you're not actually running anything. This will only show you results based on things you have set in the storyboard.
To do this, select your view controller on the storyboard and open the Attributes Inspector (Cmd+Option+4).
All of the simulated metrics are likely set to Inferred. You can change the size and orientation here.
Using this you can at least find some errors. Say I have a button at the bottom of the view, but I set the constraint to "Top Space To Superview" instead of bottom. When I change the Size Simulated Metric to the 3.5 inch, this button will be off the bottom of the screen.

ios - why do the screens on the storyboard look different (space inserted) that when I run the program?

I have this screenshot of my storyboard which looks ok, and then the simulator which has some weird whitespace block on the screen.
The simulator is retina 4-inch ios6 simulator. Is this not a correct simulator? Or is there something else I am doing incorrectly?
Thanks!
There could be two problems here.
Your constrains or springs and struts are set wrong.
Inside of Interface Builder your scroll view is scrolled down. If you have more content in a scroll view than what can be held in that scroll view, then you can scroll within that scroll view.
More than once, I've confused myself because a particularly large table view wasn't showing the table cell prototype I was looking for. My storyboard is big and I would end up hunting around for it until I realized that it's merely scrolled off the bottom.
Retina 4-inch corresponds to iPhone 5 but your storyboard's controllers view are setting for Iphone 3/4
Notice the 7 bottom right buttons inside your storyboard. Out of those 7 buttons, the one on the extrem left, will toggle your storyboard views for 3.5-inch to 4-inch displays. Since currently your storyboard is set for 3.5-inch display but you are running on a 4-inch simulator, thats the reason for the inconsistency

Resources