Use the Xcode Slicing feature to specify the dimensions of a resizable center area of an image and to optionally specify end caps, which are areas of the image that should not be filled by the resizable area
Select an asset catalog to display its contents.
In the set list, select the set containing the image to slice.
In the set viewer, select the image representation to slice, and choose Editor > Show Slicing.
Click the Start Slicing button that is displayed over the center of the image.
Click the appropriate button for the slicing operation you want to perform—horizontal, vertical, or both horizontal and vertical.
Use the Zoom In and Zoom Out buttons to increase or decrease the magnification of the image.
Drag the inner slicing handle to specify a resizable center area.
Drag the outer slicing handles to adjust the size of the end caps.
Use the Attributes inspector to fine-tune the size of the areas and to specify whether the resizable center area should stretch or tile.