简体   繁体   English

在UISegmentedControl中选择多个细分

[英]Multiple selection of segments in UISegmentedControl

Can the UISegmentedControl allow multiple selection of segments? UISegmentedControl可以允许多个选择段吗? Otherwise should we create custom controls? 否则,我们应该创建自定义控件吗?

By default, UISegmentedControl does not support multiple selection. 默认情况下, UISegmentedControl 支持多重选择。

For such a case, a custom control should be the desired solution; 在这种情况下,自定义控件应该是理想的解决方案。 I would recommend to check ATHMultiSelectionSegmentedControl library, it does provided the desired behavior of what are you looking for, it is easy to use and now it is compatible with the latest Swift version (which is 3 at the time I posted my answer). 我建议检查ATHMultiSelectionSegmentedControl库,它确实提供了您想要的行为,它易于使用,并且现在与最新的Swift版本(在我发布答案时为3)兼容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM