xcode 6 Preview Assistant Editor table view gives false preview - iphone

I'm using xcode 6.2 and testing on iphone 6.
on storyboard i design for size classes: width = compact, height = regular (i.e. all iphones in portrait) and i have a table view (dynamic prototypes) controller with custom cells i've designed.
The preview editor's iphone 4.7 inch preview differs from what i get when i run on an acctual iphone 6. it actually looks like the preview editor's iphone 4 inch preview.
any ideas?

Related

What widths and heights for landscape mode in swift?

I just started working with Auto Layout and my app will be in landscape mode. The app must be available for iPhone and iPad. What settings do I need to set for this? any - any in Auto layout? It should support iPhone 5 and later. And when I add a custom font in a text to my project in Any - Any, it looks of course smaller on an iPad because the screen is bigger. When I adjust the font to Regular width and any height and test it, it custom font is disappeared. Is this because I am using the wrong settings now? And when I insert an image, will it automatically be bigger on iPad?
Thank you very much!
In fact, there can be a lot of width/height settings for just "landscape mode, iPhone 5 or later".
If you open an interface builder file, you can click on the "wAny hAny" thingy to see what settings are suitable for what device.
For example, in the screenshot here, The settings "Regular Width | Compact Height" are for 5.5 inch phones in landscape mode:
If you don't know what size each iPhone model is, here's a simple chart:
Size (in) Model
3.5 4S
4 5
4.7 6S
5.5 6S Plus

Label displacement for 3.5 inch screen and 4 inch screen

I am developing an iPhone app and I have a few sets of labels which is fetching data from an XML feed. However, initially I designed the app for the iPhone 5 (with the bigger screen) and when I change it to 3.5 inch retina, the labels are displaced as seen in the photos.
iPhone 5 4.0 inch label
http://i.stack.imgur.com/d4LXp.png
iPhone 4 3.5 inch label
http://i.stack.imgur.com/OPNpn.png
Thus when clicking on the toggle button for designing for 3.5 inch and then editing it, then the 4 inch retina design will be displaced. Does anyone know how I can overcome this issue? Thanks. I am obviously using the storyboard to edit the files.
Mikkel, it depends if you are using Autolayout or not. To check if it's enabled, go to the File Inspector (Command+Alt+1) and see if the checkbox Use Autolayout is on or off).
If you are not using Autolayout: you will need to configure the AutoResizing Masks. In order to do so, go to the Size Inspector (Command+Alt+5). Then, for each label, you set the left margin and the top margin as fixed (the red line, not the arrow).
If you are using Autolayout: in the same size inspector, configure correctly the constraints to left and top as fixed, and it should be fine.

How to design single storyboard file that supports all iphone screen sizes?

I am using storyboard and xcode 4.6 for designing Iphone app. I have very complex viewscontrollers and some of the subviews(like scrollview's and autocomplete tablviews) have generated dynamically. When app build for iphone 4 everything works fine. But, when using Iphone(retina-4 inch) simulator, I noticed that there is space at the top and bottom of the screen and also some of the subviews (like scrollviews and autocomplete tableviews ..) misplaced and covering other subviews in that viewcontroller. I tried to search and found some are suggesting to design/load two xib files based on screen size. I have enabled both autoresize masks and autolayout, but still the problem persists.
How to design a single storyboard file that is feasible for both Iphone-4 and Iphone-5.
Reference:How to develop or migrate apps for iPhone 5 screen resolution?
Update attached screenshot:
Storyboard file
Thanks in advance...
use the button in the picture below to toggle between retina 4 in and 3.5 inch. use the autosizing tool under the size inspector on the top right to get views to position themselves correctly.

Iphone 5 and Iphone 4 screen issue

I'm creating an app using xcode 4.5 that is meant to support only the 3.5 inch retina display. Thus, in the attributes inspector for the view controller I have set the size to be 3.5 inches. However, I'm testing my app on a iphone 5 and the app auto-resizes to fit the whole screen. Do you know why this is happening? How can i make the app remain in 3.5 inches of size even when viewed off of a iphone 5?
Thanks
If you remove the default 568h#2x icon from your project the app will run the way you want. On the iPhone 5, you will get black bars on top and bottom to show what it would look like on the 4. Hope this helps.
The answer is - you can't do that :) But you can download ios5 simulator and set it's device property to 3.5 screen device

Cut text in iPhone simulator with UIRoundRectButton- unlike what I see in storyboard

I am creating a simple calculator app, following the tutorials from Stanford - first assignment.
The actual content is not that relevant, the only issue is that I have a UIRoundRectButton in the storyboard, which displays a fixed text (like "sqrt").
When I run it in the simulator (iPhone 5, iOS 6) - the text in SOME of the buttons gets cut off.
Screenshots:
Any help?
It looks to me like you're designing on a 4 inch xib but running on the 3.5 inch simulator, Autolayout will be pinning your lower buttons to the bottom of the screen and they will be getting squashed. Try one of:
Running on the 4 inch simulator (device--> hardware menu)
Switch to 3.5inch view in the storyboard (the grey icon on the bottom with the triangles above and below it
turning off Autolayout (on the file inspector of the storyboard)
Defining your constraints properly so they are all relative to the top of the view.
Those tutorials were written before Autolayout and the 4 inch display. You probably just want to focus on the tutorial content at this stage, so the last option is probably too much, but I have a blog post here discussing editing constraints in IB.
Please uncheck "Use Autolayout" option under "Show the file inspector" for XIB.