using System;
|
using Foundation;
|
using System.Collections.Generic;
|
|
namespace Shared
|
{
|
public static class PickerView
|
{
|
public static void Show(List<KeyValuePair<string, string[]>> list, Action<string> action, string sure = "Sure", string beforeValue = "")
|
{
|
var tempList = new List<NSDictionary>();
|
foreach (KeyValuePair<string, string[]> kv in list)
|
{
|
tempList.Add(NSDictionary.FromObjectAndKey(NSArray.FromStrings(kv.Value), new NSString(kv.Key)));
|
}
|
var nSArray = NSArray.FromNSObjects(tempList.ToArray());
|
ZJPickerView.Zj_showWithDataList(nSArray,
|
NSDictionary.FromObjectsAndKeys(new NSString[]{
|
new NSString(beforeValue),
|
new NSString(sure),
|
}, new NSString[] {
|
Constants.ZJPickerViewPropertyTipLabelTextKey ,
|
Constants.ZJPickerViewPropertySureBtnTitleKey
|
}), (s) =>
|
{
|
if (action != null)
|
{
|
action(s);
|
}
|
});
|
}
|
public static void Show(List<string> list, Action<string> action, string sure = "Sure", string beforeValue = "")
|
{
|
ZJPickerView.Zj_showWithDataList(NSArray.FromObjects(list.ToArray()),
|
NSDictionary.FromObjectsAndKeys(new NSString[]{
|
new NSString(beforeValue),
|
new NSString(sure),
|
}, new NSString[] {
|
Constants.ZJPickerViewPropertyTipLabelTextKey ,
|
Constants.ZJPickerViewPropertySureBtnTitleKey
|
}), (s) => {
|
if (action != null)
|
{
|
action(s);
|
}
|
});
|
}
|
}
|
}
|