|
|
#1 |
|
Custom TableViewCell action?
Hey
The question that I have is how is this "thing" called: (See figure 1) So basicly when the user tap the + next to the 1 option in the TableView. Then the information come's underneath it in the tableview. the + changes into a -. This is the process, and i want to know how this is called, it's not really a dropdown menu, because it's populating the TableView. Figure 1:
|
|
|
|
0
|
|
|
#2 |
|
It's been years since I did anything fancy like this with UITables, but if I recall correctly there's a data source method that dictates whether a row should show a +, -, both, or neither during editing. There's also a delegate method that is called when the + or - button is pressed.
I suspect that they have it set up to initially show a +, then when you press that + it inserts the two rows with animation, and changes the edit mode of the row from + to -. The table would be in edit mode the whole time. Alternatively, it's possible they just stuck in their own UIButton with the + sign and change it to a - at the right time. |
|
|
|
0
|
|
|
#3 | |
|
Quote:
Like i would have an array: Person 1 + Person 2 + to: Person 1 + Things about person 1 Person 2 + |
||
|
|
0
|
|
|
#4 |
|
Yes, it is possible.
If you're looking for more help with it, I suggest you start posting some code where you attempted to do this and we can point out mistakes you made. |
|
|
|
0
|
|
|
#5 | |
|
Quote:
If that's true, I would have an array of Person (model-class instances) as your data-source and then your unexpanded rows show only basic properties of the Person and expanded rows show more. You might need a parallel array to keep track of which rows are expanded.
__________________
|
||
|
|
0
|
|
|
#6 | |
|
Quote:
![]() So an NSDictonary that hold's my Categories, and in each categorie there is an array of strings. |
||
|
|
0
|
|
|
#7 |
|
Load the plist into your model layer. Then access from there.
I still think you are trying to bite off more than you can chew. You need to concentrate on the fundamentals right now. Have you finished that book yet?
__________________
|
|
|
|
0
|
|
|
#8 | |
|
Quote:
So I already have my data categories in my Tableview, so in did select row, or an button, it should load the data from the array categorie and show it under the categorie like a "dropdown" menu. Can't you push me in the right direction of how need to handle this ? |
||
|
|
0
|
|
|
#9 | |||
|
Quote:
Quote:
Quote:
By the way, I'm a little confused. First you were talking about Persons and now you are talking about Categories.
__________________
|
||||
|
|
0
|
|
|
#10 | |
|
Quote:
Yea sorry i'm confusing you, the persons thing was an example from the screenshot, and that not really has to do with categories that I want. I just want the drill-down menu ? Correct me if i'm wrong. I'm thinking something like this: Code:
didSelectRowAtIndex -> get label, search for that key string in my dictionary and get those value's -> Drill that down under the first categorie that it searched for? |
||
|
|
0
|
|
|
#11 | |
|
Quote:
P.S. When you say "get label" be careful not to try to get the actual UILabel that is displaying the text in the cell. Instead, you'll want to retrieve this value from your datasource.
__________________
|
||
|
|
0
|
![]() |
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -5. The time now is 09:53 AM.







I support the 
Linear Mode
