DMLSelector 1.0.1

DMLSelector 1.0.1

测试已测试
语言语言 Obj-CObjective C
许可证 MIT
发布最后发布2016 年 8 月

Meiliang Dong 维护。



  • 作者
  • Meiliang Dong

DMLSelector 是一个下拉样式选择器,支持在单表、双表和集合视图中进行选择。

截图

视频

功能

  • 支持单表、双表和集合视图样式选择器
  • 支持特定部分的独占选择
  • 支持为选择器组件自定义图像

使用方法

// Initialization

DMLSelector *selector = [[DMLSelector alloc] initWithFrame:CGRectZero];
selector.dataSource = self;
selector.delegate = self;

// Implement dataSource

- (NSUInteger)numberOfComponentsInSelector:(DMLSelector *)selector
{
    return self.selectorComponentDescriptors.count;
}

- (DMLSelectorComponentDescriptor *)selector:(DMLSelector *)selector componentDescriptorForComponentAtIndex:(NSUInteger)index
{
    return self.selectorComponentDescriptors[index];
}

// Implement delegate 

- (void)selector:(DMLSelector *)selector didSelectComponentAtIndexPath:(DMLSelectorIndexPath *)indexPath
{
    NSLog(@"%s\n values:%@", __func__, selector.selectorValues);
}

示例

要运行示例项目,请克隆仓库,并首先从 Example 目录运行 pod install

要求

  • iOS 8.0+

安装

DMLSelector 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 中

pod "DMLSelector"

许可证

DMLSelector 在 MIT 许可证下可用。有关更多信息,请参阅 LICENSE 文件。