Hello to all,
After I posted my first thread here I got a lot of encouragement from people around here, and I appreciate that a lot.
I continued studying through the book: iOS programming the big nerd ranch guide 3rd edition by Joe Conway & Aaron Hillegass, and i am now at chapter 22 (only 8 remain).
I should by now know how to use the Objective C syntax and do stuff. But, I still find it difficult to get the little pieces of the puzzle together.
I want to create an app that gets a json data, puts it in an array and then fetches the array into a UIPickerView.
I succeeded to do that after lots of googling and youtube tutorials, but, the problem is I want to create three arrays with depend on each other, i.e:
Phase 1: fetching json from url into array 1: id, title
Phase 2:
user chooses value from picker view ->
value is saved in text field 1
Phase 3:
user presses text field 2 ->
fetching json from url with the value of text field 1 as the parameter into array 2: id, title ->
user chooses value from picker view ->
value is saved in text field 2
Phase 3:
user presses text field 3 ->
fetching json from url with the value of text field 2 as the parameter into array 3: url, title ->
user chooses value from picker view with array 3 populated ->
opening a webview with the url selected as the array 3 value
and that's about it.
I want to create the UIPickerView with a method (I'm used to say function from PHP Programming), that creates the PickerView automatically, because copying-pasting the code for each array is quite idiotic in my opinion.
However, I'm stuck with all the UIPickerView additional methods.
How can I make the UIPickerView dynamic and populate it dynamically as well, when the data of the next UiPickerView depends on the selection of the current PickerView's row's value?
Thank you so much for helping.
Liroy
After I posted my first thread here I got a lot of encouragement from people around here, and I appreciate that a lot.
I continued studying through the book: iOS programming the big nerd ranch guide 3rd edition by Joe Conway & Aaron Hillegass, and i am now at chapter 22 (only 8 remain).
I should by now know how to use the Objective C syntax and do stuff. But, I still find it difficult to get the little pieces of the puzzle together.
I want to create an app that gets a json data, puts it in an array and then fetches the array into a UIPickerView.
I succeeded to do that after lots of googling and youtube tutorials, but, the problem is I want to create three arrays with depend on each other, i.e:
Phase 1: fetching json from url into array 1: id, title
Phase 2:
user chooses value from picker view ->
value is saved in text field 1
Phase 3:
user presses text field 2 ->
fetching json from url with the value of text field 1 as the parameter into array 2: id, title ->
user chooses value from picker view ->
value is saved in text field 2
Phase 3:
user presses text field 3 ->
fetching json from url with the value of text field 2 as the parameter into array 3: url, title ->
user chooses value from picker view with array 3 populated ->
opening a webview with the url selected as the array 3 value
and that's about it.
I want to create the UIPickerView with a method (I'm used to say function from PHP Programming), that creates the PickerView automatically, because copying-pasting the code for each array is quite idiotic in my opinion.
However, I'm stuck with all the UIPickerView additional methods.
How can I make the UIPickerView dynamic and populate it dynamically as well, when the data of the next UiPickerView depends on the selection of the current PickerView's row's value?
Thank you so much for helping.
Liroy
Last edited: