[IOS] Try a vector in Xcode6

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.