问题标签 [uipickerview]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
iphone - 水平旋转的iphone uipickerview?
我只在极少数 iPhone 应用程序中看到过它……但它看起来像一个向左/向右旋转(而不是顶部/底部)的选择器。
他们通常将其放在 tableView 的 1 行...以允许用户在少量选择(如 3-10)之间快速选择。
那是怎么编码的?
uipickerview - UIPickerView,无法从数组中获取数据
我正在尝试学习如何使用 UIPickerView,但我不知道为什么我的警报视图总是打印数组中的第一个元素(选择器),而不是其他任何东西。我为选择器定义了一个按钮按下为:
我的数组定义为:
当更改选择器时,我记录输出,并且值会更改为0,1,2。
但是警报视图永远不会起作用。所以我不确定我在这里做错了什么。
iphone - UIPickerView 作为子视图
我正在尝试创建一个包含 UIPickerView 的对话框。我可以让它在没有围绕它的子视图的情况下工作,但我总是会遇到一个未捕获的错误。有什么帮助吗?
iphone - 如何在 UIActionSheet 中添加 UIPickerView
我有任务输入 rating(1 - 5) 值,所以我找到了日期选择器的以下代码,谁能帮我更改下面的代码,以便添加 UIPickerView 以选择从 1 到 5 的速率
怎么做 评级的文本字段将使用 UIPIckerView 中的选定值自动输入
谢谢
ios - 如何更改 UIPickerView 中的背景颜色?
我想改变背景颜色UIPickerView
,可以吗?
iphone - UIPickerView 列标题
我正在寻找一种为 UIPickerView 的每一列(组件)添加标题的方法。在我看到的所有示例中,没有标题,因为通常可以根据其顺序、内容和上下文来确定列的含义……但是在我的应用程序中,混淆列是很危险的,所以我需要给出他们的头衔。
问候, 克雷格
iphone - How do I scroll the iPhone UIPickerView from the last item to the first and continue forever?
I want my UIPickerView to rotate to the beginning of the list when it is scrolled past the bottom. How do I do this? Basically, I want the functionality of the UIDatePicker when it scrolls the hours/minutes/seconds continuously.
I'm assuming I could just return an extremely large number from the numberOfComponentsInPickerView and then the actual titleForRow with a modulus of the number, but I think there must be a better way. Plus, I'm not sure how it is handled when the wheel starts since I can't return a negative number and it doesn't normally scroll backwards.
Any thoughts on how to do this?
iphone - UITextField 和 UIPickerView
选择 UITextField 时,是否可以出现 UIPickerView 而不是键盘?Interface Builder 中的每个选项都是某种键盘。
我想我可以以编程方式创建一个 UIPickerView 并在 UITextField 注册一个 touchUpInside 事件时创建一个,然后告诉 UITextField resignFirstResponder,但这似乎有点 hack。
是否有“官方”或更“正确”的方式来做到这一点?
谢谢!
iphone - 核心数据 - 获取唯一行
我正在开发一个使用 Core Data 的 iPhone 应用程序。我只有一个名为 Books 的实体,该实体具有 Title、Author、ISBN、Description 和 Shelf 属性。
我正在研究书籍编辑视图,并希望有一个 UIPickerView 列出所有唯一的书架行,以便用户可以选择一个书架。
我的问题是——我如何获得数据库中所有书籍的所有独特书架属性的 NSArray?我可以访问正在编辑的 Book 的 managedObjectContext,所以我会使用某种获取请求吗?
谢谢!
iphone - 如果我同时旋转一个组件和另一个组件,UIPicker 会使应用程序崩溃
我有一个包含三个组件的选择器。
前两个组件依赖于最后一个。
所以它可能是:
- | 5 | M(线条代表不同的列)或 1" | 5" | 英尺
如果我正在移动第二列或第一列并且在它们停止旋转之前我将第三列从 FT 移动到 M 或反之亦然,然后当它仍在移动时它会崩溃应用程序。
我知道这种情况正在发生,因为在pickerView:didSelectRow:inComponent:
UIPicker 的委托方法中,我正在根据第三列的最终值(即 M 或 FT)执行计算。
所以,简而言之
pickerView:didSelectRow:inComponent:
即使用户以相反的顺序触摸它们, 它也会在第一列之前执行第三列。
有没有办法解决这个问题?
可能会这样,如果一个组件仍在旋转,用户就无法移动另一个组件?
非常感谢任何帮助
谢谢
汤姆