AlertView でテーブルを表示する機能を iPhone に実装しようとしています。テーブルをクリックすると、親ビューのコントロールが塗りつぶされます。
Android では AlertDialog を介してこれを行うことができますが、Iphone ではグーグルで調べましたが、このことを実装するための提案は見つかりませんでした。
以下は Android コードですが、IOS を介してこれを行う方法
new AlertDialog.Builder(MakeReservation.this).setTitle("Previous Locations").setItems(locArray, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
String str = locArray[which];
if (str.contains(",")) {
String[] Address = str.split(",");
// String[] PickAddress = "Snoufer School, Gaithersburg, MD 45123".split(",");
if (Address.length > 0)
pickUpStreet.setText(Address[0]);
for (int i = 0; i < getResources().getStringArray(R.array.state_symbols).length; i++)
if (getResources().getStringArray(R.array.state_symbols)[i].equals(getStateCity[0])) {
pos = i;
break;
}
pickUpState.setSelection(pos);
}
if (getStateCity.length > 1)
pickUpZip.setText(getStateCity[1]);
}
}
}
}).create().show();