I will launch my App for the first time targeting iPads (universal). My problem is I came across some inequalities in how the UI scales at different iOS-versions and iPad models. This is the list of different models form the iPad simulator I tested it against:
iPad 2 7.0
iPad 2 7.1
iPad 2 8.1
iPad Air 7.0
iPad Air 7.1
iPad Air 8.1 (scales perfectly)
iPad Retina 7.0
iPad Retina 7.1
iPad Retina 8.1 (scales perfectly)
Some examples and results can be seen in the Pictures below. The inequalities how the tabBar and UISlider scales in different iOS versions and models:
My questions are.
1.How come my tabBar background picture is so messed up in example iPad 2 iOS 7.0 and not iPad Air 8.1 ? (Is it different dimensions I need to consider while using a background picture?)
2.Can I possibly target different models / versions of iPads and fix my UI like you do with macros for iPhone6 / iPhone6P ? And then how?
3.How come the interface tabBar background picture scales differently in iPad Air 7.0 and iPad Air 7.1?. These are the same iPad models with the only inequalities in different iOS versions?
All help is appreciated / Regards
If you are trying to adapt programmatic elements (like image as you mentioned), you can add conditional statements to the relevant UI objects like this:
if ([UIDevice currentDevice].model == desiredModel) {
// Code here (e.g. self.imageView.image = [UIImage imageNamed:#"image"];
} else {
// Every other case
}
If I need to repeat this process often, I normally set up a BOOL and run a check in viewDidLoad (isPad = YES / NO) and then lay out using that conditional. Since you are only targeting iPad, you can set up a similar BOOL for whatever devices need certain elements.
Having said all that, I know very little about how you are setting up your interface (programmatically, storyboard, xibs), so that's all I can offer.
Related
My application supports all devices from 4 inch onwards in both orientations.
iPhone - 5, 5S, 5C, 6, 6S, 6+, 6S+, SE
iPad 4, iPad Air, iPad Air2, iPad Pro etc
Using asset catalog for launch screen its working fine but in iPad Pro app displays standard keyboard rather iPad Pro optimized keyboard which is bigger and doesn't give best user feel.
As per below link app should be using launch storyboard rather than asset images to get optimized iPad Pro native keyboard.
https://forums.developer.apple.com/thread/26357
Now question is how to support both orientations during launch screen storyboard ?
How to add different launch images for portrait and landscape modes in storyboard ? Using size class for iPad in both orientations its both Regular and Regular size.
Note - Because it launches a screen storyboard, one can't customize the size class with custom class.
In your launchsScreen.storyboard add imageView and set it's four constraints like : top,bottom,leading,trailing.
Now, in your assets add separate images for iPhone and iPad with 1x,2x,3x resolution for iPhone and 1x,2x for iPad.
And set that image to that imageview. It will manage then for every device!
You can set different images for different size class in assets. So for different orientation you can set different images in assets.
refer Apple documentation for more details.
And yes you can use vector graphics as suggested in comment by #pkc456 to keep your app light weight.
This has been driving me nuts.
I have a toolbar on my iPAD application and its translucent property is set to 'YES'. I am doing this in my storyboard:
When I run on an iPad Air things look good. However if I run on an iPad 2 the toolbar is not translucent. I experience the same problem in the simulator and on an actual device.
This is also not a problem across different versions of the OS. IE no matter what OS I run (iOS 7 or iOS 8) its wrong on an iPad 2 but correct on an iPad Air.
Why????
Is there anything I can do to get a consistent L&F across these devices?
Translucency - which uses blur - is computationally expensive.
If you compare the control panel or notification menu between iPad 2 and iPad Air, - you will see that Apple has disabled translucency on the lower powered device as it can't really cope.
That applies to iPad2, iPad3, iPad mini and maybe some older iPhones and iPod Touches. Even higher-powered devices can give poor results if you over-use these effects.
If you need a completely consistent look and feel, you should resist using properties that take advantage of translucency and blur effects. Another option is to play around with view alpha, background colour and tint to get a semi-tranparent look on devices that don't support translucency.
For more information on device support for UIVisualEffect, which seems to coincide with 'translucency' property support on UI objects:
Check if device supports blur
Detect if device properly displays UIVisualEffectView?
I am using Xcode 6.1 with OS X Yosemite, I am facing a problem related to Storyboard. The storyboard is behave like iPhone on iPad mini but work as expected with iPad2, this problem is only with Storyboard with systemVersion 3.0 but not on it's lower version like version 2.0.
Below is my iPad mini screenshot (I don't want storyboard to behave like this)
and here is my iPad2 9.7 inch (I want this behaviour for iPad mini too)
I want to make this app only for iPad so my project configuration is like this
but when I change it's configuration Device iPad to Universal it works as expected in both iPad mini and iPad2. But I don't want to deploy on iPhone.
Here is my Storyboard systemVersion 3.0 as viewed source code
and when I make change in storyboard's XML systemVersion to 2.0 and targetRuntime to iOS.CocoaTouch.iPad it's again work as expected in both iPad mini and iPad2, but there is again a problem when ever I make some little changes in storyboard like move one pixel a label or button or any object Xcode will update it's systemVersion back to 3.0 and targetRuntime to iOS.CocoaTouch which will cause storyboard work again as iPhone on iPad mini.
I don't found any solution over interNet and my self too.
You can use Size Classes with iOS versions earlier than iOS 8. The Apple documentation states:
Deploying an App With Size Classes on Earlier iOS Versions
For apps supporting versions of iOS earlier than iOS 8, most size
classes are backward compatible.
Size classes are backward compatible when:
The app is built using Xcode version 6 or later
The deployment target of the app is earlier than iOS 8
Size classes are specified in a storyboard or xib
The value of the height component is not compact
Storyboard XML content shouldn't be edited directly. That isn't going to solve any of your problems in a reliable fashion, particularly not if you start altering version numbering so that the actual generated storyboard content is a different version to what it appears to be from the header.
It sounds like what you've encountered may be a bug in the way size classes are converted to be backwards compatible, though what is missing from your question to give more information is how you've actually configured your size classes.
You cann't use size class with iOS7, as concept of size class was introduced in iOS 8. So Removing this size class from the storyboard will work for you.
I am designing an app for 9.7 inch iPads. I would like to know if anybody has any experience on how an app designed for bigger iPads looks on iPad mini? Does it scale down automatically, somehow that is perfectly usable on the smaller screen? Or should I take any considerations into account? I have not downloaded the latest Xcode, so I am not aware if it has an iPad mini simulator. But my concern is the Physical device, even if Xcode has iPad mini simulator.
From an app's point of view, the iPad mini is identical to an iPad 1 and iPad 2. The screen has the same number of pixels - 1024x768.
Of course the screen on the iPad mini is physically smaller. This is generally only an issue if you need to draw something that comes out to a specific physical size. An example might be if you need to display a ruler in inches or cm. Otherwise it's a non-issue.
There is no separate iPad mini simulator in Xcode. There is no need for one. The screen renders at 1024x768. This works for all non-retina iPads, including the mini.
From a usability point of view, an iPad app running on an iPad mini versus the other iPads, buttons and text will be slightly smaller due to the physically smaller screen. Some people may argue that some apps would benefit from using a larger font or bigger touch areas. But in reality this shouldn't be an issue. The iPad mini has the same DPI as iPhones and iPod touches. If people can use those devices OK then they can use an iPad mini OK.
A debug tip to test on your iPad how your design will render on an iPad Mini : create a button somewhere in your app and add a target to the following method :
#ifdef SIMULATE_MINI
-(void)toggleMini{
static BOOL isMini = NO;
static float fl = 7/9.7f;
isMini = !isMini;
[myWindow setTransform:
isMini?CGAffineTransformMakeScale(fl,fl):
CGAffineTransformMakeScale(1,1)
];
}
#endif
I am new to iOS,
I seen that iPad 2 has resolution of 1024-by-768 and iPad 3 has resolution of 2048-by-1536 with retina display..
I am sure that iPad 2 app will defiantly work on iPad mini because the resolution is same..
and same case for iPhone,
Do we need to develop separate app for iPhone 5 ? because it has resolution different then other iPhone..
I am sure this is a dumb question that any mildly experienced iOS developer would laugh at but since a simple Google search didn't turn anything up I figured id ask.
Any help will be appriciated.
Will iPad2 app work on iPad3?
Yes, it will. The iPad 3 has exactly twice the pixel density in each direction as the iPad 2, so the OS will just go ahead and "scale up" the graphics (except those which are made from images in the app - you'll have to generate a higher resolution version of these image files for iPad 3).
Do we need to develop separate app for iPhone 5?
Not a separate app, you just have to pay attention to the different screen aspect ratio. If you don't do that, you'll have black bars at the top and the bottom of the screen.
iPhone 4 Apps will work on iPhone 5 :
But it will have black spaces at top and bottom, In order to refactor it you just need to change the splash screen which is suitable for iphone 5.
iPad 2 Apps on iPad3:
It will work without any issues unless they have different iOS versions running in them.
As far as I know, the difference between the iPad2 and iPad3 won't be such a big problem. (unless you want to be really exact)
Whereas you should develop a new App for the iPhone5 because it has a greatly different screen format than the iPads.
Yes, your iPad 2 working app will work on iPad 3 (also, depends on iOS version). Just it will not look good :) In order to make it look good, for all images used for your app, you have to add #2x ones with double size.
As for iPhone 5, no, you don't have to develop different app, just you have to make your views resizable to fit on screen. Good Luck!