【发布时间】:2009-09-07 14:55:38
【问题描述】:
我有一个UIPickerView,其中包含 3 个组件,其中填充了 2 个 NSMutableArrays(2 个组件具有相同的数组)。
一个教程说:
//PickerViewController.m
- (void)pickerView:(UIPickerView *)thePickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component {
NSLog(@"Selected Color: %@. Index of selected color: %i", [arrayColors objectAtIndex:row], row);
}
但我想在UIAlertView 在用户触摸 UIButton 后显示每个组件的选定行。
有没有办法做到这一点?还是我必须只使用 3 个不可见的UILabels 作为缓冲区?
提前致谢。
【问题讨论】:
-
这能回答你的问题吗? How To Get Selected Value From UIPickerView
标签: iphone objective-c cocoa-touch uipickerview