title: How to change cell height dynamically in UITableView static cell
body: <p>I am using <code>UITableViewController</code> instead detailView to show one entity details. I populated one row of data from PFQuery in my <code>viewDidLoad</code> method. I have one cell where I am using label, I want to change the size as per <code>NSString</code> size. I checked a lot of answers but all are related to <code>indexPath</code> which is for dynamic and I have static cells. <code>My label</code> showing complete string, but my cell is fixed. How can I change the height of the cell? Please help me to correct this problem.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>- (void)viewDidLoad
  {
      [super viewDidLoad];
      PFQuery *query = [PFQuery queryWithClassName:@"Entities"];
      [query whereKey:@"name" equalTo:entityName];
      [query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
          if (!error) {
              PFFile *thumbnail = [objects[0]  objectForKey:@"image"];
              detailsImageView.image = [UIImage imageNamed:@"loader.gif"];
              detailsImageView.file = thumbnail;
              [detailsImageView loadInBackground];
              detailLabel.numberOfLines = 0; // this label need dynamic height and its cell
              detailLabel.text = [objects[0]  objectForKey:@"descriptionLarge"];
              [detailLabel sizeToFit];
          } else {
              NSString *errorString = [[error userInfo] objectForKey:@"error"];
              NSLog(@"Error: %@", errorString);
          }
      }];
  }
  </code></pre>
  
  <p>I am trying to do the following by selecting individual cells but it gave me UITableView error as I have not define tableView, how can I define or if you have any other good solution please let me know. </p>
  
  <pre><code>static NSString *simpleTableIdentifier = @"DetailsDesecriptionCell";
  UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:simpleTableIdentifier];
  </code></pre>
  
  <p>I am also open on criticism of about coding quality so your feedback is valuable for me.</p>