JRG-Developer / AutoLayoutCells

AutoLayoutCells makes working with dynamic table view cells easy.
MIT License
26 stars 4 forks source link

Accessory View and Accessory Type support for iOS8 #11

Closed AnthonyMDev closed 9 years ago

AnthonyMDev commented 9 years ago

I'm not a fan of this either. I recognize that these numbers might change in later versions and this proposes a problem.

The issue here is that the width isn't the actual width of the accessoryView it seems that the width of the actual view is being accounted for. What is not being accounted for is the margin between the accessoryView.trailing and UITableViewCell.trailing.

I don't know of any way to actually access a variable for that space or to compute it. From my research and experimentation, 10.0f for accessoryType and 15.0f for accessoryView is the "Magic Number".

AnthonyMDev commented 9 years ago

@JRG-Developer If you have any suggestions or want to discuss how to do this differently, give me a call!

AnthonyMDev commented 9 years ago

I've done some more experimentation, and changing other constraints on the cell seems to alter this number. I'm trying to see if I can reverse engineer the formula. I'll close this and make another pull request if I can get it.

JRG-Developer commented 9 years ago

Yep, this can indeed be frustrating. :/

Fortunately, iOS 8 provides support from Apple for calculating dynamic table view cell size! Perhaps, this issue will just be put off until iOS 7 support can be dropped?

:]