not able to get  contentsize.height value in viewwillappear for uitableview
<p>i have created uitable(tblPartySizeSummary) view programmatically.i am calling contentsize.height in viewwillappear.i am getting 0 for content size.height.i am trying to fix scroll if content size is less or equal to table view height
i have called all delegates and datasource method properly.
my code is as below :</p>

<pre><code>tblPartySizeSummary=[[UITableView alloc] initWithFrame:CGRectMake(0,155, 320,212) style:UITableViewStylePlain];
tblPartySizeSummary.tag=2;
tblPartySizeSummary.backgroundColor=[UIColor clearColor];
tblPartySizeSummary.rowHeight=40;
CGFloat f;
f=[self tableViewHeight];


//tblPartySizeSummary.scrollEnabled=YES;
tblPartySizeSummary.delegate=self;
tblPartySizeSummary.dataSource=self;
tblPartySizeSummary.separatorColor=[UIColor lightGrayColor];
[self.view addSubview:tblPartySizeSummary];
NSLog(@"Content size height is %@",[tblPartySizeSummary contentSize].height);
if(tblPartySizeSummary.contentSize.height &lt; tblPartySizeSummary.frame.size.height)
{
    tblPartySizeSummary.scrollEnabled=NO;
}
else
{
    tblPartySizeSummary.scrollEnabled=YES;
}
</code></pre>

<p>where should i call tblPartySizeSummary.contentSize.height?
any suggestion ?
thanks?</p>
