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
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
as normal for prototype cells.
I can't add images because I'm a new user, but here are a couple links to images:
UIStoryBoard Settings: truncate setting
The title bleeding outside the boundaries of the UIButton: overflowing text
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.
Here's the code where I'm setting button's text inside - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
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
Also, I'm new to stackoverflow, so if I have missed anything that I should include, please give me some friendly advice. Thanks, Max