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 ...
随机推荐
- laravel 配置了自己的域名以后, localhost 无法访问 404 not found 的解决方法
这是后盾网视频教程的方法,应该是配置虚拟主机,此方法要改动,apache服务器里的conf文件夹里的httpd.conf文件 和conf/extral里面的httpd-vhost文件 具体改动为,co ...
- Day1[下] - Python基础1 基本语法、流程控制
一.变量\字符编码 Variables are used to store information to be referenced and manipulated in a computer pro ...
- MGTemplateEngine 模版发动机简单使用
https://github.com/nxtbgthng/MGTemplateEngine MGTemplateEngine 模版引擎 MGTemplateEngine比較象 PHP 中的 Smart ...
- opencv中的SVM图像分类(二)
opencv中的SVM图像分类(二) 标签: svm图像 2015-07-30 08:45 8296人阅读 评论(35) 收藏 举报 分类: [opencv应用](5) 版权声明:本文为博主原创文 ...
- 关于Yapi出现 请求异常,请检查 chrome network 错误信息...
项目开发中由于后台接口还没有,打算使用mock模拟本地数据,配置好接口,运行接口出现 检查了cross-request插件是否安装以及激活,发现没有问题,最后发现是我的请求地址写错了,,这里请求地址需 ...
- 一起学android之怎样卸载指定的 应用程序(25)
效果图例如以下: 代码例如以下: public class MainActivity extends Activity { private Button btn_delete; @Override p ...
- JS控制input 文本框只允许输入汉字
onblur="value=value.replace(/[^/u4E00-/u9FA5]/g,'')" onbeforepaste="clipboardData.set ...
- ASP.NET车辆管理系统100%源代码
系统开发环境为VS2010.採用ASP.NET框架.数据库採用SQL Server.系统採用Ajax,具有:GPS导航(实时监控报警).申请审核.流程查看及短信息发送等功能.这个系统界面和功能是我认为 ...
- 开源流媒体服务器--EasyDarwin
欢迎加入我们的开源流媒体服务器项目:EasyDarwin, EasyDarwin是在Apple开源流媒体服务器Darwin Streaming Server(v6.0.3)基础上进行开发和维护的免费开 ...
- EasyDarwin自动停止推流
原文转自:http://blog.csdn.net/ss00_2012/article/details/51441753 我们使用EasyDarwin的推流转发来进行媒体直播的时候,有时会有这样一个需 ...