Asset Catalog Help (ix)---Specifying a resizable area of an Image

Source: Internet
Author: User

Specifying a resizable area of an Image

Use the Xcode slicing feature to specify the dimensions of a resizable center area of the image and to optionally Specify end caps, which is areas of the image that should is not being filled by the resizable area.

Use the slicing feature of Xcode to specify the center area of the picture's resizable (resizable), and optionally specify end caps, which is the area where the picture cannot be resized.
  1. Select an asset catalog-to-display its contents.

    Select Asset Catalog to display its contents.

  2. In the set list, select the set containing the image to slice.

    In the list of picture sets, select the picture set where you want the slice image to reside

  3. In the Set Viewer, select the image representation to slice, and choose Editor > Show slicing.

    In the Gallery view area (set Viewer), select the image you want to slice, select Editor > Show slicing.

  4. Click the Start slicing button that's displayed over the center of the image.

    Click the Start Slicing button in the center of the image.

  5. Click the appropriate button for the slicing operation your want to perform-horizontal, vertical, or both horizontal and ve Rtical.

    Use the zoom in and zoom out buttons to increase or decrease the magnification of the image.

    Click the slice operation that you want to resize---horizontal, vertical, or both. Use the zoom in and zoom out buttons to increase or decrease the size of the picture.

  6. Drag the inner slicing handle to specify a resizable center area.

    Drag the inner slice handle (inner slicing handle) to specify a resizable center area.

    In the horizontal slicing example shown below, the resizable area are the 2-pixel-wide sliver specified between the left SL Icing handle and the inner slicing handle. At runtime, the resizable area replaces the opaque area of the image.

    In the landscape tile example shown below, the resizable area is a 2-pixel-wide strip between the left slicing handle and Inner slicing handle. At run time, the resizable area fills the opaque area of the picture.

  7. Drag the outer slicing handles to adjust the size of the end caps.

    Drag the outer tile handle (slicing handle) to adjust the size of end caps (non-resizable area).

  8. Use the Attributes inspector to fine-tune the size of the areas and to specify whether the resizable center area should St Retch or Tile.

    Use the attributes inspector to fine-tune (fine-tune) the dimensions of the area and specify whether the center area of the resizing is the extrude (stretch) or tile (tile).

To improve app performance, you can use resizable images for the background of many UI elements, including buttons, tab BA RS, and popovers. For example, you can create a resizable image that includes four end caps to define the four corners of a button. When the image was resized to fill the button's background area, the portions defined by the end caps was drawn unchanged.

To enhance the performance of your application, you can use resizable images for the background of many UI elements, including buttons, tab bars, and popovers. For example, you can create a button that uses a resizable picture that contains four end caps to define the four corners of the button. When the picture is used as a background picture of a button, the four Corners defined by end caps are plotted without changing.

Slicing is available-projects with a target destination greater than IOS 7 or OS X v10.10.

The slice feature is only available for projects in IOS7 or OS X v10.10 or later versions.

Related articles

Related articles

    • About Asset Catalogs
    • Customizing Image sets for Size Classes
    • Customizing Image Sets for Devices

Asset Catalog Help (ix)---Specifying a resizable area of an Image

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.