Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting a cell's UITableViewCellAccessoryType creates an overly tall app #25

Closed
stevemoser opened this issue Jul 9, 2015 · 3 comments
Closed

Comments

@stevemoser
Copy link

Setting
cell.accessoryType = UITableViewCellAccessoryType.DisclosureIndicator
in cellForRowAtIndexPath causes cells to be created with lots of padding between the two labels.

@smileyborg
Copy link
Owner

Are you using the iOS 8 self-sizing cell mechanism? Because if you're doing it the iOS 7 way, this is a known limitation, see here for more details: smileyborg/TableViewCellWithAutoLayout#11

@stevemoser
Copy link
Author

Sorry I should have specified. I am using self sizing cells.

I actually found a fix. I just set the accessory type in the tableView's willDisplayCell method and that fixes my layout issues. It seems like Apple is leaning towards doing more cell configuration in willDisplayCell than in cellForRowAtIndexPath. Or at least their sample code suggests that.

@smileyborg
Copy link
Owner

Good to know! You may want to also test on iOS 9 because they have fixed a number of outstanding bugs in the betas so far. This sounds more like a bug to me, it should work either way IMO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants