RTImageAssets:自动生成全尺寸icon以及2x/3x图片

由于Retina屏幕的存在以及5.5寸iPhone的面世,对于UI设计师来说,在为App切图的工作中,工作量成倍增加,为了适配各种屏幕,需要切1x、2x、3x一共三套不同规格的图。本文为大家介绍的RTImageAssets插件可以大大减少App开发中切图的工作量,提升开发效率.

1、RTImageAssets的下载

请在Github中下载最新版本的RTImageAssets。
点击下载

2、RTImageAssets的安装方法

  •  方法一(简单):编译安装:下载本项目,在 Xcode 中打开,构建、重启即可;
  • 方法二(通用)Plugin Manager安装:安装插件管理插件(alcatraz点击下载),搜索:RTImageAssets。

3、RTImageAssets的功能

  •  只需要一张1024*1024尺寸的icon,就能按照Apple要求生成所有尺寸的icon;
  • 能够根据3x尺寸的图片,一次性生成2x尺寸的图片;
  • 能够根据2x尺寸的图片,一次性生成3x尺寸的图片。

4、注意事项

请将您的 .xcassets 放到与项目名同名的目录下,如 abcd.xcodeproj ,那么放到 abcd 目录下!


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
你可以使用以下代码示例创建一个可以应用于其他页面的 Tabbar 底部导航栏组件: ```vue <template> <div class="tabbar"> <router-link v-for="tab in tabbarList" :key="tab.id" :to="tab.path" class="tabbar-item"> <img :src="tab.icon" :class="{ active: currentPath === tab.path }" alt=""> <span :class="{ active: currentPath === tab.path }">{{ tab.text }}</span> </router-link> </div> </template> <script> export default { data() { return { tabbarList: [ { id: 0, path: 'pages/tab/order/index', icon: 'static/orderDefault.png', selectIcon: 'static/orderPress.png', text: '订单', centerItem: false }, { id: 1, path: 'pages/tab/quckBilling/quickBilling.vue', icon: 'static/userDefault.png', selectIcon: 'static/userPress.png', text: '快速开单', centerItem: true }, { id: 2, path: 'pages/tab/mine/mine', icon: 'static/userDefault.png', selectIcon: 'static/userPress.png', text: '我的', centerItem: false } ], currentPath: '' }; }, created() { this.currentPath = this.$route.path; } }; </script> <style> .tabbar { display: flex; justify-content: space-around; align-items: center; background-color: #f5f5f5; height: 60px; } .tabbar-item { display: flex; flex-direction: column; align-items: center; text-align: center; text-decoration: none; color: #999999; } .tabbar-item img { width: 24px; height: 24px; } .tabbar-item span { font-size: 12px; } .tabbar-item .active { color: #007aff; } </style> ``` 将上述代码保存为一个名为 `Tabbar.vue` 的组件文件,然后在其他页面中引入该组件并使用即可。请注意,你可能需要根据自己的项目配置进行一些调整,比如路由配置和样式等。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值