Asset Catalog Help (十)---Specifying a Resizable Area of an Image
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 are areas of the image that should not be filled by the resizable area.
Select an asset catalog to display its contents.
选择asset catalog显示其内容。
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.
在图片集查看区(set viewer), 选择需要切片的图片,选择Editor > Show Slicing.

Click the Start Slicing button that is displayed over the center of the image.
点击图片中央的Start Slicing按钮。
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.
拖动内部的切片手柄(inner slicing handle)来指定一个可调整大小中心区域。
In the horizontal slicing example shown below, the resizable area is the 2-pixel-wide sliver specified between the left slicing handle and the inner slicing handle. At runtime, the resizable area replaces the opaque area of the image.
在下面显示的横向切片例子中,可调整大小区域是Left slicing handle 和 Inner slicing handle之间的2个像素宽的小条。 运行时,可调整大小区域将填充图片的不透明区域。

Drag the outer slicing handles to adjust the size of the end caps.
拖动外面的切片手柄(slicing handle)来调整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.
使用Attributes inspector 来微调(fine-tune)区域的尺寸,并指定可调整大小中心区域是该拉伸(stretch)或平铺(tile)。
To improve app performance, you can use resizable images for the background of many UI elements, including buttons, tab bars, 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 is resized to fill the button’s background area, the portions defined by the end caps are drawn unchanged.
为了增强应用程序的性能,你可以给很多UI元素的背景使用可调整大小的图片,包括按钮,标签栏(tab bars)以及popovers。 比如,你可以创建一个使用可调整大小的图片的按钮,它包含四个end cap来定义按钮的四个角。 当该图片被用作按钮的背景图片时,由end caps定义的四个角绘制时不会改变。
Slicing is available only for projects with a target destination greater than iOS 7 or OS X v10.10.
切片功能只在iOS7 或 OS X v10.10版本或以上版本的项目中才能使用。
Related Articles
相关文章
Asset Catalog Help (十)---Specifying a Resizable Area of an Image的更多相关文章
- Asset Catalog Help (五)---Migrating an iOS App Icon Set or Launch Image Set
Migrating an iOS App Icon Set or Launch Image Set Simplify image management by moving existing app i ...
- iOS-----About Asset Catalog
About Asset Catalogs Use asset catalogs to simplify management of images that are used by your app a ...
- Asset Catalog Help (二)---Creating an Asset Catalog
Creating an Asset Catalog Create an asset catalog to simplify management of your app’s images. 创建一个a ...
- 【译】4个你需要知道的Asset Catalog的秘密
本文由CocoaChina译者 @唧唧歪歪 翻译,作者:Hector Matos 原文:4 XCODE ASSET CATALOG SECRETS YOU NEED TO KNOW 恶梦 想象你正在干 ...
- Asset Catalog Creator Free 生成程序内图标的软件
Asset Catalog Creator Free 生成程序内图标的软件
- Invalid App Store Icon. The App Store Icon in the asset catalog in 'xxx.app' can’t be transparent nor contain an alpha channel.
1.向appstore上传应用的时候,报了这样一个错误 ERROR ITMS-90717: "Invalid App Store Icon. The App Store Icon in th ...
- Asset Catalog Help (十一)---Removing Images and Sets
Removing Images and Sets Optimize the size of an asset catalog by removing unused images or sets. 通过 ...
- Asset Catalog Help (九)---Changing Image Set Names
Changing Image Set Names Use the Attributes inspector to edit a set’s name. 使用属性检查器(Attributes inspe ...
- Asset Catalog Help (八)---Customizing Image Sets for Devices
Customizing Image Sets for Devices Add images to a set that are customized for display on the device ...
随机推荐
- C#使用WebBrowser对指定网页截图
使用webbrowser获取html,然后输出的位图即可. WebBrowser wb = new WebBrowser(); // 创建一个WebBrowser wb.ScrollBarsEnabl ...
- SQL获取年月日方法
方法一:利用DATENAME 在SQL数据库中,DATENAME(datetype,date)函数的作用是从日期中提取指定部分数据,其返回类型是nvarchar.datetype类型见附表1. SEL ...
- Android 非静态内部类导致内存泄漏原因深入剖析
背景 上周发现蘑菇街IM-Android代码里面.一些地方代码编写不当.存在内存泄漏的问题.在和疯紫交流的过程中.发现加深了一些理解,所以决定写一下分析思路,相互学习. 内存泄漏 一个不会被使用的对象 ...
- 关于提高沟通能力的书单zz
上周推荐了一份关于提高写作能力的书单,这周,我们来聊聊沟通能力. 在现代社会,沟通能力变得越来越重要.人与人之间的社交渠道越来越丰富,工作中的协同合作也越来越普遍.我们要沟通的人越来越多,节奏越来越快 ...
- HDU1009_FatMouse' Trade【贪心】【水题】
FatMouse' Trade Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) ...
- Android 中View仅仅能接收到ACTION_DOWN无法接收ACTION_MOVE和ACTION_UP解决的方法
昨天晚上调试了一晚上,在LinearLayout上接收屏幕动作,可是出现了问题, 以下的代码是本人调的代码 </pre><pre name="code" clas ...
- 在Linux的Eclipse下搭建Android环境
http://blog.csdn.net/lyonte/article/details/6407242 一.Java环境安装配置详见<在Linux下搭建Java环境>http://blog ...
- 如何清除本地DNS缓存 windows
在您的网站迁移服务器时需要对域名所指向的IP进行更改,这时候在本机访问网站时就需要清除本地的DNS缓存信息,那么怎样清除呢? 首先我们应该明白清除DNS缓存信息的原理:当计算机对域名访问时并不是每次访 ...
- MSQL Webpage
Mars Nov 19, 2014
- WPF中的数据绑定Data Binding使用小结
完整的数据绑定的语法说明可以在这里查看: http://www.nbdtech.com/Free/WpfBinding.pdf MSDN资料: Data Binding: Part 1 http:// ...