Use pixels not in xcode?

In xcode, when using xib or storyboard, xcode automatically uses dots (one pixel on the retina, four on the grid displays). It was convenient four years ago when we had to develop for both the retina and non-retina, but Apple did not sell the phone without a retina display for many years. I no longer worry about versions without @ 2x. Is there a way to override points and use pixels? It also disappoints when I want to move / stretch the image of ONE pixel, not two.

+4
source share
1 answer

You can change the borders UIViewtwice the width and height of your frame, but I would highly recommend against this, this will make your code confusing. I don’t think you should assume anything about the number of pixels per dot, Apple specifically developed iOS to be an agnostic of pixels, you should not try to convey this.

+1
source

All Articles