NactroCreditCell 是一个为 Preference 封装的 Credit Cell 库,用于便捷的展示 Credit 信息
Forked From @TranslucentMessage.
- 在项目界面工程根目录下的的
Makefile
文件中,告知编译器进行编译。
CPUTurboSettings_FILES = NectraCreditOption.m NectraCreditService.m NectraCreditCell.m
- 修改
NectraCreditCell.m
中的宏定义
#define PREFERENCE_BUNDLE_PATH @"/Library/PreferenceBundles/xxxxxxx.bundle"
- 在项目界面工程
Resource
目录下的Root.plist
文件中编写xml
代码
<dict>
<key>creditOptions</key>
<array>
<dict>
<key>service</key>
<string>website</string>
<key>username</key>
<string>https:/7float.com/</string>
</dict>
<dict>
<key>service</key>
<string>twitter</string>
<key>username</key>
<string>ryaneddisford</string>
</dict>
<dict>
<key>service</key>
<string>email</string>
<key>username</key>
<string>[email protected]</string>
</dict>
<dict>
<key>service</key>
<string>github</string>
<key>username</key>
<string>polichan</string>
</dict>
</array>
<key>avatarImage</key>
<string>Hexwell.png</string>
<key>creditPosition</key>
<string>iOS Developer</string>
<key>creditName</key>
<string>Hexwell</string>
<key>height</key>
<integer>84</integer>
<key>cellClass</key>
<string>NectraCreditCell</string>
</dict>
正如最上方的截图可以看到,我们提供了多种 icon 可供选用。
<dict>
<key>service</key>
<string>website</string>
<key>username</key>
<string> 网址 </string>
</dict>
<dict>
<key>service</key>
<string>twitter</string>
<key>username</key>
<string> 推特用户名 </string>
</dict>
<dict>
<key>service</key>
<string>email</string>
<key>username</key>
<string> 邮件地址 </string>
</dict>
<dict>
<key>service</key>
<string>reddit</string>
<key>username</key>
<string> Reddit 用户名</string>
</dict>
<dict>
<key>service</key>
<string>paypal</string>
<key>username</key>
<string> PayPal 用户名</string>
</dict>
<dict>
<key>service</key>
<string>github</string>
<key>username</key>
<string> Github 用户名</string>
</dict>
<dict>
<key>service</key>
<string>instagram</string>
<key>username</key>
<string> Instagram 用户名</string>
</dict>
<dict>
<key>forcedFormattedUsername</key>
<string>AppleBetas</string>
<key>service</key>
<string>googlePlus</string>
<key>username</key>
<string> GooglePlus 账号数字组 </string>
</dict>
<dict>
<key>forcedFormattedUsername</key>
<string>AppleBetas</string>
<key>service</key>
<string>youtube</string>
<key>username</key>
<string> YouTube 地址</string>
</dict>
<key>avatarImage</key>
<string>头像图片(含扩展名)</string>
<key>creditPosition</key>
<string>职位名称</string>
<key>creditName</key>
<string>展示的用户名</string>
<key>height</key>
<integer> Cell 高度 </integer>
<key>cellClass</key>
<string>NectraCreditCell</string>
NactroCreditCell is available under the MIT license. See the LICENSE file for more info.
Thanks to @Dynastic Open Source this sophisticated Credit Cell in his TranslucentMessages project :)