xamarin ios UIPickerView
来源:互联网 发布:平板炒股软件 编辑:程序博客网 时间:2024/05/24 05:05
private void SetupPayoutsPicker()
{
List<string> payouts = new List<string> ();
for (int i = 1; i < 201; i++) {
payouts.Add (i.ToString ());
}
PickerModel model = new PickerModel (payouts);
if (payouts != null && payouts.Count != 0) {
getPayout = payouts [0];
}
model.PickerChanged += (sender, e) => {
getPayout=e;
};
UIPickerView picker = new UIPickerView ();
picker.ShowSelectionIndicator = true;
picker.Model = model;
UIToolbar toolbar = new UIToolbar ();
toolbar.BarStyle = UIBarStyle.Black;
toolbar.Translucent = true;
toolbar.SizeToFit ();
UIBarButtonItem doneButton = new UIBarButtonItem ("Done", UIBarButtonItemStyle.Done,
(s, e) => {
txtPayouts.Text=getPayout;
txtPayouts.ResignFirstResponder();
});
toolbar.SetItems(new UIBarButtonItem[]{doneButton}, true);
txtPayouts.InputView = picker;
txtPayouts.InputAccessoryView = toolbar;
}
{
List<string> payouts = new List<string> ();
for (int i = 1; i < 201; i++) {
payouts.Add (i.ToString ());
}
PickerModel model = new PickerModel (payouts);
if (payouts != null && payouts.Count != 0) {
getPayout = payouts [0];
}
model.PickerChanged += (sender, e) => {
getPayout=e;
};
UIPickerView picker = new UIPickerView ();
picker.ShowSelectionIndicator = true;
picker.Model = model;
UIToolbar toolbar = new UIToolbar ();
toolbar.BarStyle = UIBarStyle.Black;
toolbar.Translucent = true;
toolbar.SizeToFit ();
UIBarButtonItem doneButton = new UIBarButtonItem ("Done", UIBarButtonItemStyle.Done,
(s, e) => {
txtPayouts.Text=getPayout;
txtPayouts.ResignFirstResponder();
});
toolbar.SetItems(new UIBarButtonItem[]{doneButton}, true);
txtPayouts.InputView = picker;
txtPayouts.InputAccessoryView = toolbar;
}
0 0
- xamarin.ios uipickerview
- xamarin ios UIPickerView
- Xamarin.iOS + MvvmCross: UIPickerView data binding, SelectedItemChanged event
- iOS UIPickerView
- iOS UIPickerView
- iOS UIPickerView
- IOS UIPickerView
- IOS UIPickerView
- ios iphone 自定义UIPickerView
- iOS开发:UIPickerView控件
- IOS UIPickerView使用
- iOS开发:UIPickerView控件
- iOS编程之UIPickerView
- iOS基础 -- UIPickerView
- iOS uipickerview 选择DATE
- IOS UIPickerView 学习笔记
- [IOS]UIPickerView选择时间段
- iOS开发中的UIPickerView
- unsupervised learning(association)
- Junit高级
- spring事物不回滚问题!
- github常见操作和常见错误!错误提示:fatal: remote origin already exists.
- github 提交代码 方法
- xamarin ios UIPickerView
- 反射的动态代理
- 搜索提示是如何实现的
- 安卓ListView图片异步加载错位的处理
- 学习数据结构的方法
- android Key简要说明
- 外挂原理
- 我的IOS 9 适配
- iOS9适配