问题标签 [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.

0 投票
3 回答
11137 浏览

iphone - 非常简单的 iPhone 问题。如何用两列制作 UIPickerView?

我已阅读有关创建具有两列或更多列的 UIPickerView 的其他问题,但找不到确切的解决方案。

这是如何以编程方式为 iPhone 完成的?如何添加静态数据?谢谢!

0 投票
1 回答
303 浏览

iphone - 如何更改 UIPickerView 所说的内容?

我正在开发一个使用 PickerView 的应用程序,但我不知道如何更改它所说的内容。目前它只是说“库比蒂诺,桑尼维尔等”,它不会上升或下降。当我做模拟器时,它只是显示为一个蓝色矩形。

0 投票
1 回答
1989 浏览

uipickerview - UIPickerView selectedRowInComponent: returns stale data after code adjusts it

I have a UIPickerView with multiple components. Some values are grayed out, and my pickerView:didSelectRow:inComponent honors this by shifting the picker component in question to the nearest valid value, much as UIDatePicker moves from "30" to "28" when you select "February". Then it calls a delegate method to announce the adjusted value.

When my adjuster method calls my UIPickerView's selectRow:inComponent:animated:YES, the value on screen is correct, but the values from selectedRowInComponent: are stale (from before the adjustment for gray values). However, if I call selectRow:inComponent:animated:NO, the returned values are correct, but the lack of animation is jarring.

I've tried wrapping the adjustment in a beginAnimations:/commitAnimations block and catching the values in UIView's +animationDidStopSelector, but I still get stale values. Has anyone run into this before?

The problem is easy to duplicate.

If you have YES to animated it, then retValue is 0 on mind (you call it stale). Changing to NO, retValue will be the same as newValue.

0 投票
1 回答
3132 浏览

uipickerview - 选择器视图作为子视图

我目前正在开发一个应用程序并且我坚持使用pickerview。我有一个按钮 n 我的视图 n 当我单击该按钮时,我希望选择器视图显示为子视图,但我无法执行此操作。我还想从选择器视图中选择一个值并将其存储在某处以用于进一步的操作。任何人请帮助.......

0 投票
11 回答
115860 浏览

ios - 在操作表中添加 UIPickerView 和按钮 - 如何?

我的应用程序需要在操作表中添加以下内容。

  • UI工具栏
  • UIToolbar 上的按钮
  • UIPicker 控件

我已包含一张图片以了解我的要求。

替代文字

您能否解释一下,如何实施?

0 投票
2 回答
26924 浏览

iphone - Elegantly replace iPhone keyboard with UIPickerView

I have a table view that has embedded UITextFields for entering some data. It also has two other fields that popup a UIPickerView and a UIDatePicker - as demonstrated in the DateCell example from Apple.

Mostly it works but I can't figure out how to cleanly transition from the text field keyboard to the other pickers - one slides out, one slides in - it looks weird and the scroll position on the table view sometimes gets screwed up - with everything scrolled off the top.

What I'd like to do is replace the text field keyboard without it animating away and without it growing the table view back to full size.

Any clues?

0 投票
2 回答
3664 浏览

iphone - UIPickerView:最后一个值后跟第一个值

谁能帮助我如何使 UIPickerView 在最后一行的值之后显示第一行的值,就像 UIDatePicker 在 12 之后将跟随 1 一样。

谢谢

0 投票
1 回答
1315 浏览

objective-c - 从 NSUserDefault 读取和更新字典类型 PSMultiValueSpecifier

有谁知道如何轻松地将字典类型 PSMultiValueSpecifier 从 NSUserDefault 读取到 UIPickViewer 控件中,并使用 iPhone SDK 3.0 将更改保存回 NSUserDefaults?如果是这样,您可以发布一些特定的代码来有效地做到这一点吗?

0 投票
6 回答
11580 浏览

iphone - 如何更改 UIPicker 颜色?苹果手机

我观察到 UIPicker 始终保持黑色,

有什么方法可以改变 UIPicker 的颜色和它的选择指示器吗?

谢谢你帮助我。

0 投票
2 回答
1674 浏览

iphone - 在 UIPickerView viewForRow 中从 NIB 加载一行

我想在我的 UIPicker 中创建一个相当复杂的行。我见过的所有示例都像这样从头开始创建视图......

这基本上有效,它在我的 Picker 中显示了一个紫色矩形。

但我希望能够像这样从NIB文件中加载pickerView项目......

这会产生一个空白屏幕,甚至不再显示选择器。我可以按照第一种方式来做,并在代码中构建我的子视图,但显然这里发生了一些我不明白的事情。有人知道吗?