Firstly I am begginer with ios.I have a problem which different iphone models the screen(stroyboard) is not fit regularly .I was formed storyboard by compact with Base values(e.g 3.5 4 4.7 inch).İt is good on iphone 6 simulator but iphone 5 or iphone 4 it be small and the view objects sliped out of screen.What am i do?,is there any way to overcome this with easily ?I want to screen(storyboard) is fitted regularly on above iphone 4 models.
İphone 5
iphone 6s
you need to used constraints the put the object Relatively at the views .
you need to read how to used constraints.
Related
I'm using autolayout storyboards for my ios app which is only for iPhone. When I submit, Apple reject it saying that the app should support iPhone 3.5 inch for ipad view on iphone resolution but making the UI for iPhone 3.5 inch is bit hard.
If I change it to support iPhone 3.5 inch onwards it gives bad view for iphone 5 inch. The contents are not centric there's long space for iphone 5 inch. What are the solutions?
Can I configure the settings to support iPhone 4 onwards?
or else Can I make two storyboards for iPhone 3.5 inch & 5 inches?
Yes, you can make 2 storyboards and switch them, depending on screen height, but why you can't adjust constraints for all iPhones screens? Usually this is possible.
One way for complex layouts - create constraint outlets and change them in code.
Another way - divide design to smaller UIViews, that contains elements, like container and set constraints between them.
I've disabled size classes in my project and have 3 view controllers.
By looking at the preview of each of the view controllers, I've noticed that the iPhone 6 which is the one I've been running the application on shows a layout completely different than how it looks when you run it on the actual phone.
I'm trying to build an application with size classes disabled that will have an adaptive layout between iPhones. I was under the impression that size classes was geared towards adaptivity between iPhone and iPad applications?
My app looks good on the iPhone 6 and terrible on the 6 plus. I would like the layout to be adaptive between both iPhones. Any advice?
Thank you
PS: Using autolayout
First of all enable Size classes. This is how you can vary the changes for 6 and 6+. If you want the similar layout on both the devices then use 600x600 size. If you want different layout in 6 and 6+ then you have to switch the size class and change the constraints accordingly. Refer this link for tutorial: https://www.raywenderlich.com/113768/adaptive-layout-tutorial-in-ios-9-getting-started
I understand the role of auto-layout but if I am developing for iPhone devices only, should I still use size classes? From my understanding, size classes are extremely useful if I am developing for iPad as well, in my case I am not. Would the more sensible option be to use size classes but just use COMPACT WIDTH | REGULAR HEIGHT ?? Or should I not use size classes and just build my app using auto-layout?
There are two situations where size classes are useful in the iPhone development:
If you want to support landscape and portrait and want to have different constraints in different orientations and even hiding/showing different vies.
If you want to do a SPECIFIC layout for iPhone 6+ in LANDSCAPE
If you don't want these two conditions, you can ignore size classes them or disabling them.
For more information on the differentiation you can have with the current devices check out this link.
The problem with iphone is that there 4 sizes of iphone in the market right now.
Iphone 6 Iphone 6 Plus Iphone 5 Iphone 4
Using COMPACT WIDTH | REGULAR HEIGHT will limit your option when you rotate your device
iphone 6 iphone 5 and iphone 4 when rotated ->
COMPACT WIDTH | COMPACT HEIGHT
Therefore I would rather recommend you to code in ANY WIDTH|ANYHEIGHT so it is more compatible to any UI SIZE
*note size classes is useful when implementing extra buttons in different UI
ie. suppose you create an calculator app, in an iPad it can fit extra button while in iphone you can't . so you use size classes to make sure you share the same codebase
source CS193p, stanford IOS 8 course
I have to design an application that supports iOS versions from 6.1 to 8.1. In order to support iOS 6.1, i can't create storyboards with size classes. So i have to use only XIBs and use auto layout for the XIBs.
When i run my application in Xcode 6.1, it looks like all the layouts are perfectly fine. But when i run the same application in Xcode 5.1.1, all the views are reshuffled starting from iPhone 4 to iPhone 5.
Now i have to design my XIBs in such a way that the views are layed out properly in all the devices from iPhone 4 to iPhone 6 Plus. Can someone please suggest me a proper way of how i can create the XIBs that supports all the devices?
Apple has really some solid documentation on how to use autolayout and build dynamically sizing screens using constraints. Another solid tutorial to check out is this one from appcoda. Can be a little confusing at first but once you understand constraints making screens that look nice for all screen sizes is actually pretty straightforward
Recently, Apple Inc. has released new iPhone 6 and iPhone 6 Plus devices with a new OS (iOS 8) and tons of API changes. As well as there are more available displays' resolutions, an application should support at least 3 of them, I'm talking about iPhone 5/5S, iPhone 6 and iPhone 6 Plus. Xcode 6 follows another way it did in the previous version. Now, in most cases, you don't create a Scene for a concrete display size (e.g. 4 inch., 3.5 inch.) but you do create a form or a page sheet. It's basically bigger than even iPhone 6 plus resolution, due to a new way of maintaining layouts. As far as I'm considered, you must create layouts and only through them you can achieve supporting different resolutions.
What I am going for is a minor misunderstanding of how to setup my layouts to support at least those 3 devices I have listed above. The problem is being that I can support only iPhone 6 and iPhone 6 Plus with the best performance (i.e. objects are placed just as I wanted them to be). But what do I do for iPhone 5/5S support? Are there any resources I can read to understand the thing of layouts better? I appreciate your help in advance!
P.S. I tried to use a particular form's size in Interface Builder (4.7 inch., 4.0 inch.), but as well works only for the same resolution or higher.
An example is below. I have got wanted result for iPhone 6 and wrong thing for iPhone 5S.