Hi, I'm making an application which is going to have possibly hundreds of cells in a tableview.
I have two questions. First of all, should I make use of the new 'Static Cells' feature in Xcode, or will this not be a good idea when I've got hundreds of cells?
Second question, for my application, each destination view (the view that a cell press will take you to) will be different from the others, in that there will be different UI elements on each one, along as each view having different coding. So should I make a different view and corresponding .h and .m file for each individual cell in my table view? I am assuming this would not be the way to go, as there may (or may not, I am still quite fresh to obj-c) be quite a performance hit doing this way. Other thoughts I've had for this problem is to programatically create the view depending on which cell was made (would't mind avoiding this way ) or to have a few views for similar layouts and just hide some ui elements, but I'm just lost when it comes to this.
But anyway, If you have a solution for me, please let me know, otherwise good day and thanks for reading!
Hi, I'm making an application which is going to have possibly hundreds of cells in a tableview.
I have two questions. First of all, should I make use of the new 'Static Cells' feature in Xcode, or will this not be a good idea when I've got hundreds of cells?
Is the number of cells constant?
Does the content and layout of each cell vary?
If the answer to both of these are yes (which I can't imagine with 100) cell then I would say yes. However in storyboard with static cells you are going to have to layout each one - not fun.
My guess is either the number of cells varies based on something or the layout of many of the cells are the same or quite possibly both. In that case I would definitely use prototype cells.
I would be surprised if static cells are the way to go here.
Quote:
Originally Posted by dre_bro11
Second question, for my application, each destination view (the view that a cell press will take you to) will be different from the others, in that there will be different UI elements on each one, along as each view having different coding. So should I make a different view and corresponding .h and .m file for each individual cell in my table view? I am assuming this would not be the way to go, as there may (or may not, I am still quite fresh to obj-c) be quite a performance hit doing this way. Other thoughts I've had for this problem is to programatically create the view depending on which cell was made (would't mind avoiding this way ) or to have a few views for similar layouts and just hide some ui elements, but I'm just lost when it comes to this.
But anyway, If you have a solution for me, please let me know, otherwise good day and thanks for reading!
I would do as much of the layout as possible with the storyboard. However again do you really have 100 different views that the layout and content is significantly different? If so by all means make each one. But again like the table above I suspect many are the same or very similar and I would create a few pattern views and reuse them.
Without more information thats about all I can say.
Basically, my application is going to be sort of like a unit converter, only much much more advanced, and covering wider areas, not just simple conversions. So, yes the information in te table field will be permanent. There will be a set number of cells, and the information in these cells will stay te same. (The layout and content of my tableview cells is constant).
As for the views, they will all contain textfields and possibly even a custom digit pad, however, for my application, there will be a different number of text fields and the code behind these textfields will differ (for different conversions). So whilst, yes, they are similar in a way, should I just hide/unhinge elements depending on the cell selection, or should I programatically create views, or should I storyboard a single view for each selection?
Also, just so you know, for now the number of cells may only be in the 20s - 30s, but within a few months, it will grow quite dramatically with updates. So if I have to be a little bodgy for now, although I dont want to, I might just have to turn a blind eye and do it until I sort something further out. But then I'm just impacting on my skills and the poor customers!
I am truly sorry for not being more specific, but also appreciate you answering. I you require more information, just let me know.
Last edited by dre_bro11; 12-22-2011 at 09:10 PM.
Reason: More info