Hey,
I've got a requirement for something that if i used uiwebview in each cell, it would make life hell-u-va lot easier.. but then, its not recommended .. at all!
So, i decided to create a custom cell.
Lets consider 4 controls in a cell. One UIImageView, 2 UILabels and 1 UIButton.
the UIImageView position can be static in the cell predefined (at the left corner). No problems here.
UIButton (sporting an image) and UILabel come next in terms of horizontal rect.x and Beyond that, UILabel2. X= (15+uilabel.bounds.size.width) something like that.
Heres what I want,
What If UILabel1 could not get any string (empty) from the data source, In that event, I want the cell to realign itself. The UILabel2 pushes (starts where UILabel1 would start if existed) back and uilabel1 vanishes.
Similarly, if UIImageView has no image from datasource, Both the labels move a few .x behind
I think you see where this is going. Three20 probably has this built in. But I feel as if I lost control if I use it, besides, I wanted to learn this:
I think layout subviews is where the fuss!. Its the logic proceedure thats a little confusing.
Any direction is much appreciated.
thanks
I've got a requirement for something that if i used uiwebview in each cell, it would make life hell-u-va lot easier.. but then, its not recommended .. at all!
So, i decided to create a custom cell.
Lets consider 4 controls in a cell. One UIImageView, 2 UILabels and 1 UIButton.
the UIImageView position can be static in the cell predefined (at the left corner). No problems here.
UIButton (sporting an image) and UILabel come next in terms of horizontal rect.x and Beyond that, UILabel2. X= (15+uilabel.bounds.size.width) something like that.
Heres what I want,
What If UILabel1 could not get any string (empty) from the data source, In that event, I want the cell to realign itself. The UILabel2 pushes (starts where UILabel1 would start if existed) back and uilabel1 vanishes.
Similarly, if UIImageView has no image from datasource, Both the labels move a few .x behind
I think you see where this is going. Three20 probably has this built in. But I feel as if I lost control if I use it, besides, I wanted to learn this:
I think layout subviews is where the fuss!. Its the logic proceedure thats a little confusing.
Any direction is much appreciated.
thanks