One of the most convenient features of the Xcode6 is that the imported image resource supports the vector chart format. This is undoubtedly a great news for developers.
But what about this vector diagram? What are the benefits? What's the effect? Take a look at the Xcode6 and try out the magic of vector images yourself.
We first made a 30*30 icon with sketch and exported the PDF and PNG formats:
Then add two icons to the images.xcassets in Xcode6. The first is the version of the vector diagram:
Next is the PNG version, we only uploaded the @1x version of the bitmap:
Then we look for a page and put two images to compare.
The first experiment: the length and width are all 100, namely the non-equal ratio stretching:
You can see the @1x figure because there is no @2x and @3x version, there are a lot of vague details.
The second Test: the length and width are 240, equal ratio display:
The gap is more obvious.
Xcode6 in the use of vector graphics, will generate corresponding @1x, @2x, @3x version of the bitmap, equivalent to help us do the work of adaptation. For example, the 30*30 vector image is imported, and the runtime generates a bitmap of the following three dimensions:
@1x = 30*30
@2x = 60*60
@3x = 90*90
Well, that's probably it. So individual developers can try to reduce their workload with a vector graph. The company will forget, let the artists busy up!
[IOS] Try a vector in Xcode6