测试测试 | ✗ |
Lang语言 | Obj-CObjective C |
许可证 | MIT |
Released最新版本 | 2015年3月 |
由 Daniel Thengvall 维护。
ViewController.h 视图文件
#import "DTFormViewController.h"
@interface ViewController : DTFormViewController
@end
ViewController.m 视图文件
- (void)viewDidLoad {
[super viewDidLoad];
[super setFormObjects:@[
// Array of objects that extend DTBaseFormObject
]];
}
注意您不需要在 viewDidLoad 方法中执行 setFormObjects,它可以从任何地方调用。
ExampleTextInputFormObject.h 视图文件
#import "DTBaseFormObject.h"
@interface ExampleTextInputFormObject : DTBaseFormObject
- (ExampleTextInputFormObject *)initWithPlaceholder:(NSString *)placeholderText onChanged:(void (^)(NSString *text))onChangedBehavior;
@end
ExampleTextInputFormObject.m 视图文件
- (UICollectionViewCell *)toCollectionViewCell:(UICollectionView *)collectionView :(NSIndexPath *)indexPath {
UICollectionViewCell *exampleCell = [collectionView dequeueReusableCellWithReuseIdentifier:@"example" forIndexPath:indexPath];
// Customize cell
return exampleCell;
}
DTFormMenuController 可通过 CocoaPods 获取。要安装它,只需将以下行添加到您的 Podfile 中
pod 'DTFormMenuController', '0.1.8'
您可以将项目轻松更新为使用 CocoaPods
sudo gem install cocoapods
platform :ios, deployment_target: '8.0'
pod 'DTFormMenuController', '0.1.8'
pod install
DTHENG, [email protected]
DTFormMenuController遵守MIT授权协议。有关更多信息,请参阅LICENSE文件。