I'm making an app that I want applicable to all sizes but the problem is that iPhone 8 up to iPad devices are good but I noticed that the iPhone SE and below iPhones are not being supported when you make your app for iPhone 8 and up because it's so small. Now does that mean I have to create a scroll view for all my pages not since it doesn't fit for iPhone SE and below or is it recommended to not just include iphone se size and below for any future app?
It's recommended to create your app to be universal and support all screen sizes to hit users from the market as much as you can , regrading support for IPhone 4 , 5 I think you need to have a scrollView in any screen that you think it may exceed screen height for these 2 devices , or create items height in proportional to screen height to guarantee that all UI elements will fit in the screen
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 am designing an app for iOS in SWIFT. I have decided that the auto layout will be compact and will be only for iPhone in portrait mode. I wanted to clear up a few hiccups on designing buttons for the 2 different screen ratios: the first being the iPhone 4s and the second ratio being the iPhone 5 and above. Because the new iPhones have a taller height, does that mean I will need to design 2 different ratios of buttons, and if so, how do I use them in Xcode? For example here's the stock apple calculator;
link to picture: http://imgur.com/mkIBghD
As you can see the the buttons on the taller iPhone have a square shape. The buttons on the 4s are more stubby. What do I need to do in Xcode to let the app know which asset to use for the respective phone and how would I implement that in Auto Layout?
thanks
In order to do this you setup autolayout constraints. This will make the buttons change shape/size depending on the device. You do not need to have multiple assets because all the phones you are talking about have the same retina (2x) display.
You need to add three different sized images for a single Image Set in Images.xcassets . The sizes should be 1x for iPhone 4s, 2x for iPhone 6(It'll work for iPhone 5 too) and 3x for iPhone 6 plus.
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 seen old iOS apps auto-scale to fit iPhone 6/6+'s large screen on iOS 8. I have recently developed an app which is optimized to display on iPhone 6's 4.7 inch screen. Apply auto-layouts would be lots of work because a lot of views are created programmatically so I am wondering is it possible to make an app auto-scale to fit smaller screens?
Use auto layout in code
Refactor your code to support different screen sizes
Refactor your code to size views as percentage of screen size
I have an iOS app that currently supports all screen sizes of iPhone and iPod touch (but not iPad), only in portrait orientation. The app supports iOS 7 and newer. My visual designer suggested increasing some metrics within certain UITableViewCell and UICollectionViewCell instances when displaying on the iPhone 6 Plus. For example, the image cell that shows an icon or a contact photo will be about 25% larger (by points) only on iPhone 6 Plus.
After reading this Adaptive Size Design article at apple.com, I see that iPhone 6 Plus does not have a distinct size class from smaller screen devices when in portrait orientation. Does this mean that I should detect the screen resolution and handle the iPhone 6 Plus-specific metrics in code instead of the xib? Or is there a way to handle this in the xib that I haven't come across yet?
In code, I could easily specify an alternate xib to load for iPhone 6 Plus, but would prefer to only have one xib to support all screen sizes and scale factors. This app might support iPads in the future, but not right now.
Yes: if you wish to display a distinct UI on the 6+ in portrait, you're going to have to do it programmatically, either by using UIScreen or UIDevice to identify when you're running on that hardware.