476
社区成员
发帖
与我相关
我的任务
分享
Juice
制作你自己的电池测量尺度,不在使用无聊的电池指示,使你的电池信息更加有趣,
截屏
安装
你可以通过Xcode编译app源文件,或者下载最新的二进制版本。
添加一个比例
1选择偏好并点击“添加新的比例”,这将会尝试创建并打开一个新的plist文件,能够通过Juice来使用并加载一个自定义比例。plist的结构见下文中的描述。
2在你喜爱的文本编辑器中对你的比例plist进行需要的改变并保存。
3选择偏好并重新扫描比例,你现在应该可以查看标题的比例,只需在比例下拉列表创建并选择即可。
Plist 格式
目前用来加载自定义比例的是简单的plist文件,文档结构:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>default</key>
<string>Edit The Default Value To Show</string>
<key>detents</key>
<dict>
<key>0</key>
<string>Edit Me, I'll be triggered from 0 to 10%</string>
<key>1</key>
<string>Edit Me, I'll be triggered from 10 to 20%</string>
<key>2</key>
<string>Edit Me, I'll be triggered from 20 to 30%</string>
<key>3</key>
<string>Edit Me, I'll be triggered from 30 to 40%</string>
<key>4</key>
<string>Edit Me, I'll be triggered from 40 to 50%</string>
<key>5</key>
<string>Edit Me, I'll be triggered from 50 to 60%</string>
<key>6</key>
<string>Edit Me, I'll be triggered from 60 to 70%</string>
<key>7</key>
<string>Edit Me, I'll be triggered from 70 to 80%</string>
<key>8</key>
<string>Edit Me, I'll be triggered from 80 to 90%</string>
<key>9</key>
<string>Edit Me, I'll be triggered from 90 to 100%</string>
</dict>
<key>title</key>
<string>Edit The Title</string>
</dict>
</plist>
Key Name
Value Type
Description
default
String
如果Juice无法计算出电源情况时显示的默认值
detents
Dictionary<String, String>
一个队字符串值的操纵映射,用来显示给用户
title
String
在偏好UI中显示的比例标题
注意:保存的plist文件的名字应该是独一无二的,因为如果你通过UI创建比例,那么默认生成的UUID的名字是文件名。