测试已测试 | ✓ |
语言语言 | Obj-CObjective C |
许可协议 | BSD 2.0 |
发布上次发布 | 2015年4月 |
由Jeong YunWon维护。
依赖 | |
cdebug | >= 0 |
FoundationExtension | >= 0 |
SevenSwitch | ~> 1.3.0 |
GIKPopoverBackgroundView/Core | >= 0 |
UI7Kit是一个GUI工具包,可以将iOS7的扁平式UIKit向后移植到iOS5/iOS6。此外,UI7Kit还可以用来在运行时修复旧UIKit以兼容UI7Kit。
注意:该项目尚未成熟,仍在改进中。您可能会遇到一些bug或复杂的实际产品中的意外行为。
案例1:动态修补(推荐使用)
#import <UI7Kit/UI7Kit.h>
[UI7Kit patchIfNeeded]; // in main.m, before UIApplicationMain()
案例2:部分使用
: 使用UI7代替UI。 : 例) UI7NavigationController,而不是UINavigationController
案例3:部分动态修补
#import <UI7Kit/UI7Kit.h>
[UI7<class> patchIfNeeded]; // ex) [UI7TableView patch];
全局色调颜色(可选)
[[UI7Kit kit] setTintColor:<UIColor object>]
注意:请参阅以下部分来安装或设置您的项目。
使用当前代码的示例。(0.9.6)
截图最左侧列上的手机是iOS7,中间和右侧列上的手机是iOS5或iOS6。
下载源代码
# Copy and paste this lines
git clone git://github.com/youknowone/UI7Kit.git
cd UI7Kit
pod install
open UI7Kit.xcworkspace # You should open xcwordspace
如果您没有cocoapods,请访问http://www.cocoapods.org或按照以下步骤进行:
# At first, install Commoand Line Tools from XCode->Preferences->Downloads.
sudo gem install cocoapods # May takes long time
pod setup # Do not sudo here
现在运行测试应用。
更新源代码和cocoapods
git pull # if you edited code, 'git fetch origin && git rebase origin/master'
pod update
open UI7Kit.xcworkspace # You should open xcwordspace
如果您遇到任何方法缺失的问题,通常pod update
可以解决问题。
如果您没有cocoapods,请访问http://www.cocoapods.org或按照以下步骤进行:
# Install Commoand Line Tools in XCode->Preferences->Downloads first.
sudo gem install cocoapods
pod setup # Do not sudo here
如果您有Podfile,添加'UI7Kit'。或者按照以下步骤进行:
# Copy and paste this lines
echo "platform :ios, '5.0'" > Podfile
echo "pod 'UI7Kit'" >> Podfile
pod install
open *.xcworkspace
此命令将生成或编辑YourProject.xcworkspace
。请打开它而不是您原始的YourProject.xcodeproj
。
我不是手动维护作者列表,但我小心地跟踪Git作者。查看
按照上面的步骤安装CocoaPods,但让你的app Podfile看起来像这样
pod 'UI7Kit/UI7Slider'
pod 'UI7Kit/UI7ActionSheet'
pod 'UI7Kit/UI7AlertView'
pod 'UI7Kit/UI7BarButtonItem'
pod 'UI7Kit/UI7Button'
pod 'UI7Kit/UI7Color'
pod 'UI7Kit/UI7Font'
pod 'UI7Kit/UI7NavigationBar'
pod 'UI7Kit/UI7NavigationController'
pod 'UI7Kit/UI7PickerView'
pod 'UI7Kit/UI7ProgressView'
pod 'UI7Kit/UI7SegmentedControl'
pod 'UI7Kit/UI7Slider'
pod 'UI7Kit/UI7Stepper'
pod 'UI7Kit/UI7TabBar'
pod 'UI7Kit/UI7TabBarController'
pod 'UI7Kit/UI7TabBarItem'
pod 'UI7Kit/UI7TableView'
pod 'UI7Kit/UI7TableViewCell'
pod 'UI7Kit/UI7TextField'
pod 'UI7Kit/UI7Toolbar'
pod 'UI7Kit/UI7View'
pod 'UI7Kit/UI7ViewController'
pod 'UI7Kit/UI7Switch/SevenSwitch' # use SevenSwitch (default)
pod 'UI7Kit/UI7Switch/KLSwitch' # use KLSwitch
pod 'UI7Kit/UI7Switch/MBSwitch' # use MBSwitch
如果这个项目让你在使用时感到愉快,或者它对你有所帮助,一点小费将非常感激。谢谢 ;)
@lukaszmargielewski