On my MB Air the iPad (retina) simulator, even at it's smallest size (50% scale) does not fit on the screen, requiring awkard scrolling. Does anyone know of a property that can be edited or something to make it even smaller than 50%?
You can use the cmd key modifiers to change the size:
Cmd+1 - original
Cmd+2 - smaller
Cmd+3 - smallest (this works best for me on my Macbook Air 11)
Unfortunately not, from what I've found. This link from a similar question explains,
it seems reasonable for the accurate rendering profiling that it maintains 1-to-1 pixel ratio, otherwise it would have to sub-sample the pixels, causing the profiling to be incorrect.
I use a 13" MB, so I understand that it's difficult to fit the iPad simulator on the screen.
Related
I have a tableview and the cells have a picture, the picture width is the screen width, and height is the screen width.
A picture size is about 900k, so it is big.
when I run this code and scroll, on iPhone 6 memory is 44M, but on iPhone 6S+ plus memory is 370M or more, I don't why.
iPhone 6 is having Apple A8 ,64-bit Architecture &in iPhone 6S+ having Apple A9, 3rd Gen , 64-bit Architecture.
In Apple A9, 3rd Gen , 64-bit runtime, many data types used by Cocoa Touch frameworks (as well as the Objective-C language itself) have increased in size or have stricter memory alignment rules.Also the runtime requires proper function prototypes to be used when making function calls. This is the reason for slight difference in your memory.
Thanks
The iPhone 6 use #2x images when 6+ uses #3x.
So it is quite normal than memory use is greater on 6+ than on 6.
Question is, is the ratio 44M vs 370M logical ?
Not really, it should be around 66M. as #Paulw11 said, using instrument may give you an explanation.
( Maybe your are scaling the image, and it use lot of memory to do that, try to export an #3x version of the image and try again )
Why do we need these 3 particular image types?
If I have a button on my app with a background image say, 50 pixels x 50 pixels, why do I need 3 versions of this image? What's stopping me from just making one image that's much higher in res, say, 700x700 so when it shrinks down on any iPhone it won't fall under the max res the device would want?
Only thing I can think of is it just takes up more space, but for simple apps / a simple button it seems like it wouldn't cause any issues. I've tried it on a few devices and see no difference between them when I simulate it and do this method. However, as I dive more into apps and stuff I'm sure there is substance behind this technique.
If you don't have the exact size, there are two things that can happen:
Upscaling
#3x or #2x can be upscaled from #1x but usually the visual result is blurry, with thick lines and doesn't look good. Upscaling #3x from #2x can be even worse because subpixels must be used.
Downscaling
In general, the results are much better than with upscaling, however, that doesn't apply for all the images. If you have a 1px border on a #3x image, after downscaling it to #1x the border won't be visible (0.33px). The same applies for any small objects in the image. Downscaling destroys all details.
In general - for an image to look perfect, you want to avoid both downscaling and upscaling. You can always go with only #2x or #3x images and add other scales only if you see visual problems. Using higher resolution won't improve downscaling. High resolutions are used only to avoid upscaling. Downscaling from a high scale (e.g. #100x) to #1x won't create better results than downscaling from #3x.
You need 3 kinds of images in Image Assets because in terms of Scaling or Pixels
There are 3 kinds of Apple Devices (iPhone and iPad) that is
Normal device which terms to 1 pixel = 1 point#1x (Older iPhone and iPad devices)
Retina device which terms to 4 pixels(2 x 2) = 1 point#2x (iPhone 4+)
Retina iPhone6 and iPad which terms to 9 pixels (3 x 3) = 1 point#3x (iPhone6+)
Thus for providing same image in 3 scales iOS decides which image to show for which devices.Hope could help you understand this.
EDIT
It is because if you provide one high resolution graphic it would be waste of space on a users' device. Thanks to app slicing the device will download (from App Store) only the parts that actually fits the device (so retina device won't download non retina graphics). This is why Apple created assets catalogs and this kind of rules to follow. They describe it in their sessions.
In short it is to decrease memory/disk usage so it is all about increasing performance and user experience
First of all, you need to know points vs. pixels behaviour. On non-retina devices, point vs pixels ratio is 1point=1pixel. On retina devices, there are two ratios: 1point = 2x2 pixels depending on screen size, and 1point=3x3 pixels, because of pixels density, that is quadrupled watching on non retina. That's why you need this 3 types of images, to be shown on its highest resolution.
Complementing what Sulthan said:
Because you didn't propitiated proper images for a specific device, it has to downscale or upscale. These processes will use up your memory and processing, resulting maybe in a decrease of performance, depending on how many images at a time you're doing it and the size of image.
If you provide only one big image you encounter several problems:
Downscaling leads to the loss of quality (even if it is not huge)
It takes more computational power to downscale the image than to display the already pre-rendered image
The size of your binary gets increased and you are not able to benefit from app thinning which is introduced with iOS 9.
As you can see, producing only one image will impact the performance and quality of your app and it will disproportionately hit those with older devices. This is because:
They need to downscale more. Also, the performance of their devices is not as good as that of the new ones, so they are much more likely to notice the lags with your app
They do not have as much storage space so you really want to be able to use app thinning to help them
The loss of quality will be the highest for them and considering the fact that the resolution of their devices is low, they will notice it.
Due to this users are likely to be unhappy and this is bad for you. Because, from my experience, unhappy users are 10 times more likely to rate your app than happy users. You don't want that, do you? :)
I have a big problem that is causing all sorts of complications. I want to make native-resolution graphics for my iPhone 5 app using the 326ppi Retina Display quality graphics. However, all of my Views seem to be defaulting at 320px width! So the only option I've been able to find is to make my graphics much larger, and then use the 'redraw' graphics option to make the graphics look somewhat nice.
However, I would much rather just use pixel-for-pixel native resolution images. What can I do to get xcode to show my views with retina display resolutions? I am using the latest xcode and programming for iOS 6.1
Thanks!
In UIKit views are measured in points:
(CGSize){width, height}
. . where width and height are measured in points. On an iPhone 3GS (normal display), this gives the following widths:
(CGSize){320, 480} //screen resolution is 320x480
On an iPhone 4:
(CGSize){320, 480} //screen resolution is 640x960
. . ie - exactly the same. To draw a pixel at position {1,1} on an iPhone 4, the point would be:
(CGPoint}{0.5, 0.5}
Since the resolution on a retina display is exactly double, it makes drawing very easy between devices. UIKit will work out what pixel to set, given the hardware, when you supply floating point numbers. (Similar to the way OpenGL works). . . . it gets a little more complicated when supported 3.5 vs 4 inch screens.
For image assets, just name the resources as follows:
myResource.png - regular
myResource#2x.png - retina display
myResource-568#2x.png - retina display, especially for 4 inch screen. (Eg backgrounds, etc).
This has been bugging me for a while. I don't understand why one should include low-res images. If a 3GS, for example, can't find the low-res image, it just uses the #2x version anyway and displays it at it's native resolution. So why add to the filesize of your app by including all the half-res images?
Halley had it right. The system does not automatically downsample #2x images to non-retina size, and it shouldn't. The 3Gs does not have enough memory to load retina images. It will likely choke your app and cause it to exit with an out of memory error.
The problem gets even worse with the iPad 1. The iPad 1 has very low memory relative to it's screen size, and if you tried to make it load retina sized images, it would choke and die very quickly.
To scale an image the system has to load it at full size and do a complex scaling operation each time it draws it. It's the worst of all possible worlds - slower, 4x as much memory, and the images don't look as good.
In most cases, you can make an icon look better when created at the low-res resolution, instead of having the system scale it. If you don't care too much about how your icons look when scaled, then using the #2x version only is probably fine.
The other posters mentioned some excellent points, but here's one more for posterity: as mentioned several times in http://developer.apple.com/library/ios/#DOCUMENTATION/UserExperience/Conceptual/MobileHIG/IconsImages/IconsImages.html#//apple_ref/doc/uid/TP40006556-CH14-SW1, a 2x image may be more detailed. In other words, the low-res image isn't simply a scaled-down version of the 2x image; the 2x image may contain details not present in the smaller image.
#2x filenames are intended for Retina Display enabled devices.
If you intend to use them for display on the iPhone 3GS make sure to properly test that they look as acceptable as the low-res image Apple wants you to use.
The reason being, is when images are scaled up if there is no #2x available, they can become pixelated and blurry, so you would prob think that making the original image twice as big would solve the problem.
But no, because the retina devices would still scale it up (in my experience) and non retina devices would display the image incorrectly.
It's got a lot to do with the quality standards Apple wants for the Apps on their app store
I designed my first ipad app.
And when i run it on the simulator resolution is really small. Smaller than really ipad's resolution. Right now i have not ipad, and cant test app on it.
What the problem with resolution?
UPD I connect big display to my macbook. But resolution is still small. I think thats because macbook's display is primary and big monitor is the second. How can i change it?
The problem is that the physical resolution of your screen is lower than the physical resolution of the iPad’s screen. For example my iMac’s screen has 1920 pixels per ~19 inches of width, or roughly 100 pixels per inch. The iPad’s screen density is about 130 ppi, one third higher. If you’re serious about your app, you have to test on the real device anyway. (By the way, if you are simply talking about the window size, that can be changed in the Window menu or using ⌘1–⌘3 shortcuts.)