0

I am using this Tutorial for developing application setting screen.The problem is i want to increase height of cell in setting screen.And I have not taken any table view i am doing that by using Root.plist file.i.e i want to increase height of Legal field in this Image (application setting screen not in table view of application)

mshau
  • 503
  • 4
  • 19

3 Answers3

1

First, you'll need to save the selected indexPath row:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 
{
   self.selectedRowIndex = [indexPath retain];
   [tableView beginUpdates];
   [tableView endUpdates];
}

Then, when you have the currently selected index, you can tell the tableView that it should give that row more space.

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath 
{
   //check if the index actually exists
   if(selectedRowIndex && indexPath.row == selectedRowIndex.row) 
   {
        return 100;
   }
   return 44;
}

This will return height 100 for the selected cell. You can also check this

Rushi
  • 4,553
  • 4
  • 33
  • 46
Rahul Gupta
  • 808
  • 11
  • 15
0

Use this set row height in a UITableView

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
// Return the height For Row.
return 100.0;
}
Ayaz
  • 1,398
  • 15
  • 29
0

As it can be seen from your image the indexPath for which you need to increase the row height is section 1 and row 0:

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath 
{

   NSIndexPath *indexValue = [NSIndexPath indexPathForRow:0 inSection:1];

   if (indexValue == indexPath)
      return 100.0;
   else
      return 44.0;
}
Bhupendra
  • 2,525
  • 18
  • 20