测试已测试 | ✗ |
语言语言 | Objective-CObjective C |
许可证 | MIT |
发布日期最新发布日期 | 2014年12月 |
由 Matteo Gobbi 维护。
MGConferenceDatePicker 是一个扩展了 UIView 的对象,提供了一种非常优秀的数据选择器类型。
此代码必须在 ARC 下使用。如果您的代码不使用 ARC,可以使用编译器标志 -fobjc-arc
以标记此源代码:标记此源代码
该包中包含了测试该对象的项目。以下是从代码中初始化控件的一个简单示例。
//New view controller
UIViewController *pickerViewController = [[UIViewController alloc] init];
//Init the datePicker view and set self as delegate
MGConferenceDatePicker *datePicker = [[MGConferenceDatePicker alloc] initWithFrame:self.view.bounds];
[datePicker setDelegate:self];
//OPTIONAL: Choose the background color
[datePicker setBackgroundColor:[UIColor whiteColor]];
//Set the data picker as view of the new view controller
[pickerViewController setView:datePicker];
//Present the view controller
[self presentViewController:pickerViewController animated:YES completion:nil];
或者您也可以直接在 NIB 或 XIB 文件中设置视图,并简单地从代码中设置委托。
请参阅示例项目。
Matteo Gobbi
MGConferenceDatePicker 可在 MIT 许可证下使用。