I am having table view.
I want to dynamically increase the height of the row to some size.
How can I do this.
I know its a silly question.But still can’t find the solution.Help me please.
I have used this code.But it is not working :
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
UILabel *lblOutTime = [[UILabel alloc]init];
lblOutTime = [[UILabel alloc] initWithFrame:CGRectMake(2, 20, 200, 40)];
lblOutTime.text =@"Outtime : ";
lblOutTime.backgroundColor = [UIColor clearColor];
lblOutTime.font = [UIFont boldSystemFontOfSize:5.0f];
lblOutTime.font = [UIFont fontWithName:@"HelveticaNeue Heavy" size:5.0f];
[cell.contentView insertSubview:lblOutTime atIndex:1];
return cell;
}
–
is only 2 fixed positions of cell height.
as the if conditions shows.