iOS启动页自动命名工具
2016-09-19 17:10
411 查看
前段时间做了个app模板,需要大量打包app。其中就涉到启动页命名。设计师给的是中文命名。哎,如果让设计同学一张一张给,可能也会有些麻烦。无奈,自己写了利用
AppleScript写了个工具,在这里分享出来。
主要思路就是判断图片的高,根据不同高度命不同的名字。
iPhone4:640*960
iPhone5:640*1136
iPhone6:750*1334
iPhone6P:1242*2208
我也打了个包,下载下来就可以用了。
自动命名启动图.zip
AppleScript写了个工具,在这里分享出来。
主要思路就是判断图片的高,根据不同高度命不同的名字。
iPhone4:640*960
iPhone5:640*1136
iPhone6:750*1334
iPhone6P:1242*2208
set iPhone4_name to "Default-480h@2x.png" as string set iPhone5_name to "Default-568h@2x.png" as string set iPhone6_name to "Default-667h@2x.png" as string set iPhone6P_name to "Default-736h@2x.png" as string set f to choose folder tell application "Finder" set all_files to (files of entire contents of f) as alias list end tell repeat with this_file in all_files try tell application "Image Events" set this_image to open this_file -- extract the value for the metadata tag tell this_image set the image_height to the value of metadata tag "pixelHeight" end tell -- purge the open image data close this_image if the image_height = 960 then set the name of this_file to iPhone4_name as string else if the image_height = 1136 then set the name of this_file to iPhone5_name as string else if the image_height = 1334 then set the name of this_file to iPhone6_name as string else if the image_height = 2208 then set the name of this_file to iPhone6P_name as string else display dialog buttons {"Cancel"} default button 1 end if end tell on error error_message display dialog error_message end try end repeat
我也打了个包,下载下来就可以用了。
自动命名启动图.zip
相关文章推荐
- iOS内存泄漏自动检测工具PLeakSniffer
- 【IOS工具帖】Xcode快捷键大全(附带代码自动排版)
- iOS - 为了自动打包研究nomad工具碎碎念
- iOS项目中网络层实现自动转为对象的网络请求工具封装
- 自己动手设计一款iOS自动构建发布工具
- iOS 自动打包工具 ipa server,当然使用蒲公英分发平台更好
- iOS内存泄漏自动检测工具PLeakSniffer
- 相片管理必备:文件批量改名工具 自动以日期时间命名
- iOS 本地自动打包工具
- iOS内存泄漏自动检测工具PLeakSniffer
- IOS 通过脚本自动打包工具 webfrogs/xcode_shell
- iOS自动生成各种icon的工具 (希望有时间写一个简单文档)
- ios images.xcassets launchimage (启动页)重命名
- ArcGIS模型工具中迭代器使用及自动命名设置(ArcGIS栅格批量按图幅裁剪)
- 教你快速高效接入SDK——iOS多渠道自动打包工具核心原理
- 强命名规范与代码自动生成工具
- iOS 本地自动打包工具
- 驾照科1自动刷新挂机耗时间,再推荐个IOS动态注入工具
- iOS 自动打包工具 + 分发测试