要运行示例项目,请克隆仓库,然后首先从 Example 目录运行 pod install
。
要使用界面构建器中的此控件,请添加一个 UIView 并将其设置为自定义类。默认属性可以设置在界面构建器的属性检查器中。
创建 ODMSwipeSelector 的实例,将其添加到您的视图中,并设置您想要自定义的属性值。
ODMSwipeSelector *heightSelector = [[ODMSwipeSelector alloc] initWithFrame:CGRectMake(0, 20, 320, 50)];
heightSelector.backgroundColor = [UIColor whiteColor];
heightSelector.title = @"Height";
heightSelector.unit = ODMMeasureFormatInch;
heightSelector.value = 5.5;
[self.view addSubview:heightSelector];
Oscar De Moya @odm
ODMSwipeSelector 在 MIT 许可下可用。有关更多信息,请参阅 LICENSE 文件。