Note that there are some explanatory texts on larger screens.

plurals
  1. POiOS UIButton text not getting truncated
    primarykey
    data
    text
    <p>I am making an app that generates a UITableView from data. I have a custom UITableViewCell that contains a UIButton with text. The title of one of the generated buttons is too long for the UIButton, but isn't getting truncated as I have selected in the UIStoryBoard. The cells are getting created in my UITableViewController function <code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath</code> as normal for prototype cells.</p> <p>I can't add images because I'm a new user, but here are a couple links to images:</p> <p>UIStoryBoard Settings: <a href="http://i.imgur.com/w3kfQ.png" rel="nofollow">truncate setting</a></p> <p>The title bleeding outside the boundaries of the UIButton: <a href="http://i.imgur.com/j52kL.png" rel="nofollow">overflowing text</a></p> <p>Does anyone know how to fix this. It was working earlier. I changed the size of the UIButton and the font of the title text, but I don't think that should make a difference.</p> <p>Here's the code where I'm setting button's text inside <code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath</code></p> <pre><code> CellIdentifier = @"PopoverCell"; cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath]; ((MSPopoverCell *)cell).nameLabel.text = data.FullName; //setting the label, works fine [((MSPopoverCell *)cell).button setTitle:data.DisplayString forState:UIControlStateNormal];//setting the button title, bleeds over </code></pre> <p>Also, I'm new to stackoverflow, so if I have missed anything that I should include, please give me some friendly advice. Thanks, Max</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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