nactro / NactroCreditCell

NactroCreditCell 是一个为 Preference 封装的 Credit Cell 库,用于便捷的展示 Credit 信息

Home Page:https://github.com/nactro/NactroCreditCell

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

screenshot

NactroCreditCell

NactroCreditCell 是一个为 Preference 封装的 Credit Cell 库,用于便捷的展示 Credit 信息
Forked From @TranslucentMessage.

Usage

  1. 在项目界面工程根目录下的的 Makefile 文件中,告知编译器进行编译。
CPUTurboSettings_FILES = NectraCreditOption.m NectraCreditService.m NectraCreditCell.m
  1. 修改NectraCreditCell.m中的宏定义
#define PREFERENCE_BUNDLE_PATH  @"/Library/PreferenceBundles/xxxxxxx.bundle"
  1. 在项目界面工程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>lazysloths@yahoo.com</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>
Reddit
<dict>
<key>service</key>
<string>reddit</string>
<key>username</key>
<string> Reddit 用户名</string>
</dict>
PayPal
<dict>
<key>service</key>
<string>paypal</string>
<key>username</key>
<string> PayPal 用户名</string>
</dict>
GitHub
<dict>
<key>service</key>
<string>github</string>
<key>username</key>
<string> Github 用户名</string>
</dict>
instagram
<dict>
<key>service</key>
<string>instagram</string>
<key>username</key>
<string> Instagram 用户名</string>
</dict>
GooglePlus
<dict>
<key>forcedFormattedUsername</key>
<string>AppleBetas</string>
<key>service</key>
<string>googlePlus</string>
<key>username</key>
<string> GooglePlus 账号数字组 </string>
</dict>
Youtube Channel
<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>

License

NactroCreditCell is available under the MIT license. See the LICENSE file for more info.

Thanks

Thanks to @Dynastic Open Source this sophisticated Credit Cell in his TranslucentMessages project :)

About

NactroCreditCell 是一个为 Preference 封装的 Credit Cell 库,用于便捷的展示 Credit 信息

https://github.com/nactro/NactroCreditCell

License:MIT License


Languages

Language:Objective-C 100.0%