Note that there are some explanatory texts on larger screens.

plurals
  1. POUITableViewController cell design issue
    text
    copied!<p>I have a UITableViewController with an attached xib file. Inside the xib file i have a TableViewCell object with a view inside it along with labels on the view. Below is an image of what my result should be:</p> <p><a href="http://casperslynge.dk/2.png" rel="nofollow noreferrer">pic1 http://casperslynge.dk/2.png</a></p> <p>And below is how my tableview is looking atm.</p> <p><a href="http://casperslynge.dk/iphone1.png" rel="nofollow noreferrer">pic2 http://casperslynge.dk/iphone1.png</a></p> <p>My issue is that I can't get the table view cell to fill the entire window. Have tried everything inside the interface builder. Nothing to do with the origin or the width/height. Below is how I instantiate my cell with the xib file and fill my labels with data. </p> <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString * CompanyListCellIdentifier = @"CompanyList"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CompanyListCellIdentifier]; if (cell == nil) { NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"CompanySubscriptionView" owner:self options:nil]; cell = [topLevelObjects objectAtIndex:0]; } NSUInteger row = [indexPath row]; CompanyModel *company = [list objectAtIndex:row]; name.text = company.name; network.text = company.networks; NSString* subscriptionCountString = [NSString stringWithFormat:@"%d", company.subscriptions.count]; subscriptionCount.text = subscriptionCountString; fromPrice.text = company.fromPrice; NSString* trustScoreString = [NSString stringWithFormat:@"%d", company.trustScore]; trustScore.text = trustScoreString; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; return cell; </code></pre> <p>}</p> <p>The weird thing is that in the next view when one of the cell's are pressed, I have no issue making the view fill the entire width and height, and it is created in exactly the same way (see picture below). Is it something in the xib file that I am doing wrong or in the code?</p> <p><a href="http://casperslynge.dk/iphone2.png" rel="nofollow noreferrer">pic3 http://casperslynge.dk/iphone2.png</a></p> <p>Can anybody help? </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload