Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sujithkrishnan

macrumors 6502
Original poster
May 9, 2008
265
0
Bangalore
Hi,

In my iPhone app, i made use of UITablView, with both styles..

I am assigning UITablevIewCell's text as

cell.text = presentItem.title;
Then the text on cell is showing clearly....

Say .... "item number 1", "item number 2",.... etc...

If i am changing the style of table (during init) to UITablevIewStyleGrouped,
the cell.text are shown as having trailing ends for all cells...

like .... "item num...","item num..." etc...

Also the separation line is breaking below the texts. i felt the dimension of cell.text n Grouped style is having higher height and lower width than Plain style... (However its not in developer's control i think..)

But for UITableViewStyleGrouped, if i change the line as

cell.text = @"item number" // statically assigning

it will show perfectly for all cells.......

say .."item number","item number".....

Why such things happen with dynamic strings ???

I want my table in grouped style...

What are the other changes than in look-style happen when we change the tableViewStyle ??

What i marked RED (above) is right, why the behaviour change with static string and dynamic string???
 

Enuratique

macrumors 6502
Apr 28, 2008
276
0
Hi,

In my iPhone app, i made use of UITablView, with both styles..

I am assigning UITablevIewCell's text as

cell.text = presentItem.title;
Then the text on cell is showing clearly....

Say .... "item number 1", "item number 2",.... etc...

If i am changing the style of table (during init) to UITablevIewStyleGrouped,
the cell.text are shown as having trailing ends for all cells...

like .... "item num...","item num..." etc...

Also the separation line is breaking below the texts. i felt the dimension of cell.text n Grouped style is having higher height and lower width than Plain style... (However its not in developer's control i think..)

But for UITableViewStyleGrouped, if i change the line as

cell.text = @"item number" // statically assigning

it will show perfectly for all cells.......

say .."item number","item number".....

Why such things happen with dynamic strings ???

I want my table in grouped style...

What are the other changes than in look-style happen when we change the tableViewStyle ??

What i marked RED (above) is right, why the behaviour change with static string and dynamic string???

I'm not entirely sure why a static string would work versus a dynamic string, but you do atleast have control over the cell's height... Take a look at UITableViewDelegate's heightForRowAtIndexPath method... You would put this in the same class you're setting the cell text.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.