受平面主题启发的自定义绘制控件集合。基于 UICustomizeKit 构建。
FTButton *button = [FTButton buttonWithColor:[UIColor alizarinColor] raised:NO];
[button setTitle:@"Button" forState:UIControlStateNormal];
button.frame = CGRectMake(left, top+6, 80, 40);
[self.view addSubview:button];
top += button.frame.size.height+6;
button = [FTButton buttonWithColor:[UIColor alizarinColor] raised:YES];
[button setTitle:@"Button" forState:UIControlStateNormal];
button.frame = CGRectMake(left, top+6, 80, 40);
[self.view addSubview:button];
FTProgressView *view = [FTProgressView progressViewWithColor:[UIColor alizarinColor]];
[view setProgress:0.75];
view.frame = CGRectMake(12, 86, 150, 30);
[self.view addSubview:view];
FTSlider *view = [FTSlider sliderWithColor:[UIColor alizarinColor]];
view.frame = CGRectMake(12, 86, 150, 30);
[self.view addSubview:view];
FTSwitch *view = [FTSwitch switchWithColor:[UIColor alizarinColor]];
view.onBackgroundColor = [UIColor midnightBlueColor];
view.frame = CGRectMake(12, 86, 70, 30);
[self.view addSubview:view];
FTActivityView *view = [FTActivityView activityViewWithColor:[UIColor alizarinColor]];
view.frame = CGRectMake(20, 86, 40, 40);
[self.view addSubview:view];
[view startAnimating];
FTRadialProgressView *view = [FTRadialProgressView progressViewWithColor:[UIColor alizarinColor]];
view.frame = CGRectMake(20, 86, 40, 40);;
[view setProgress:0.8 animated:YES];
[self.view addSubview:view];
需要 UICustomizeKit。该仓库可在此找到
https://github.com/daltoniam/UICustomizeKit
安装 FlatUIKit 的建议方法是使用 CocoaPods 软件包管理器,因为它提供灵活的依赖关系管理和简单易用的安装过程。
通过 CocoaPods
如果尚未安装,请安装 CocoaPods
$ [sudo] gem install cocoapods
$ pod setup
切换到您的 Xcode 项目的目录,创建和编辑 Podfile 并添加 RestKit
$ cd /path/to/MyProject
$ touch Podfile
$ edit Podfile
platform :ios, '5.0'
pod 'FlatUI'
将 RestKit 安装到项目中
$ pod install
通过 .xcworkspace 文件打开 Xcode 项目(而不是通常的项目文件)
FlatUIKit 基于 Apache 许可证。