Swift UIPickerView 禁用组件 [英] Swift UIPickerView disable component

查看:32
本文介绍了Swift UIPickerView 禁用组件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下用户界面:

如果使用开关,是否可以仅禁用最后两个组件?如果是这样,我该怎么做?

Is it possible to disable only the last two components if the switch is used? If so, how can I do this?

推荐答案

您不能禁用组件.但是,您可以使用 reloadAllComponents 方法重新加载选择器,并且您应该只重新加载所需的组件.不加载时间组件.

You can not disable the components. However you can reload picker using reloadAllComponents method and you should reload only required components. Do not load time components.

这篇关于Swift UIPickerView 禁用组件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆