iOS Simulator 100% Scale isn't 100% [duplicate] - xcode

This question already has answers here:
How to resize the iPhone/iPad Simulator?
(12 answers)
Closed 4 years ago.
When I choose 100% scale in iOS Simulator, the resolution of the simulator doesn't match the resolution of the physical device. Here's a screenshot of iPhone 6 Plus being simulated at 100% on my 20 inch ACD (1680x1050), which should have a width of 1080px:
But it doesn't. Does this happen to anyone else?
How can I fix it?

I think your simulator is displaying at 100%.
iPhone 6 Plus renders at 1242 x 2208 pixels. That seems to match your screenshot.
The problem is that the phone itself displays at 87% to fit its 1080 x 1920 display.

Related

How can I add a high resolution device to Responsive Design Mode?

I've added an iPhone X to Firefox Responsive Design Mode:
This is the correct resolution, and Device Pixel Ratio for an iPhone X:
2436x1125-pixel resolution at 458 ppi
However when using the custom device, Firefox shows the device to be massive. It seems to ignore the DPR on the device completely.
How can I add a high resolution device to Responsive Design Mode?
Since nobody else has answered, and I've found something myself:
Divide the real pixel size by the DPR and enter that as the 'Size'.
1125 / 3
2436 / 3
So for an iPhone X, if you want to cut and paste, you'd enter:
375
812
3
Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A356 Safari/604.1
This is odd, as you've already entered the DPR and would expect Firefox to calculate this for you, but that's how it works.

XCode: Tab Bar Item image is pixelated

I am using custom images for tab bar icons and they are showing up pixelated and I can't figure out why. The image is 32x32 and 300ppi. I've tried it on 72 and 150ppi and they are all pixelated. Anyone have a solution?
Thanks,
Adam
You need two images one 32 x 32 pixels and named MyIcon.png and one 64 x 64 pixels named MyIcon#2x.png. You then specify MyIcon in the storyboard and iOS will load the correct image for the current hardware.
The ppi (is a print production concept) has no effect in iOS. iOS measures every thing in Points, the iPhone 5 screen is 320 points x 568 points. Retina screens are 2 pixels x 2 pixels for each point. Non retina screens are 1 pixel = 1 point.
UPDATE:
For the iPhone 6 Plus (iOS 8) you now need a third image MyIcon#3x.png that is 96 x 96 see Image resolution for new iPhone 6 and 6+, #3x support added? for lots of good details.

How to adjust brightness in application [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Change Backlight Brightness on iPhone Programmatically
How can i adjust brightness in my application in xcode 4 with a UISlider? I can't find any modern code on how to access it.
There is no public API to reduce overall screen's brightness as found under Brightness setting. However if your intent is to just reduce the brightness of you app, you can change the opacity of the view.

What does e a large triangle with a yellow exclamation mark on my iPad Launch Image mean?

I am converting my iPhone app to a universal app and just added the launch image for the iPad. The image works fine, but in xCode there is a large triangle with an exclamation mark in it. What does this mean? I thought it might because the file size was too large? I reduced it from a meg to 168k and the triangle is still there.
Thanks,
John
It most likely means that the image dimensions are wrong. They should be 768 x 1004 (W x H) for an iPad launch image in portrait. For landscape it should be 1024 x 748 (W x H).
You should also be able to hover over the yellow triangle to see the same error.
Apple's guidelines for launch image size are here: iOS HIG, Image Sizes.

will my apps work on iphone OS4?

Screen resolution has increased in iphone OS4. Since lot of UI stuff have hardcoded co-ordinates, will my app run properly on OS4? I still haven't got Snow Leopard, so cant test run the simulator for OS4.
It is publicly known that the number of points vs pixels is 2:1 so point 320 has 640 pixels in hi-res and 320 pixels in low-res. Low resolution images will be somewhat jaggy, but their positioning on the screen would remain the same.

Resources