Im trying to create an array inside an array inside an array. Then use a UIPickerView with 3 components, each for the respective array. The reason I used arrays is because the data is organized like this:
var array1 = [
"2"
[ "2"
["2.5","2.5"],
"1-1/12"
["2.5","2.375"]],
"3"
[ "2-1/2"
["3.375", "3.25"],
[ "2"
["3.375", "3"]]]
I've tried making dictionaries to call from (easier for UIPickerView) but the [(key:value)] combo won't work with tuples.
var dict: [(size: String, outlets: (outlet1: String, measure1: String, measure2: String))] = [
("2", ("1-1/2","2.5","2.375"))
]
func numberOfComponents(in pickerView: UIPickerView) -> Int {
return 3
}
There's not much info about arrays inside arrays or dicts inside dicts.
The source data is from a chart that looks like this:
--> outlet1 --> value1, value2
size1 --> --> outlet2 --> value1, value2
--> outlet3 --> value1, value2
--> outlet1 --> value1, value2
size2 -->
--> outlet2 --> value1, value2
Outlets can be the same String
as size.