venmo / Static

Simple static table views for iOS in Swift.
http://blog.soff.es/static
MIT License
1.25k stars 87 forks source link

fixes footer and header heights on ios 11 to be automatic dimension if the view returns as 0 #109

Closed rhaining closed 7 years ago

hyperspacemark commented 7 years ago

I'm good with this. Please squash down to one commit before merging. 🎱

txaiwieser commented 7 years ago

I really don't think this changes are good. This 2.0.2 version changed all my layouts that were fine in iOS 11.. I think you app code its wrong, not this lib

dmiluski commented 7 years ago

@txaiwieser for context, how are you setting you footers? Sizing them between iOS10/11?

txaiwieser commented 7 years ago

I have a lot of tableViews with custom headers and footers and they were working fine in iOS 10 and 11. They have the correct sizing, but now with this new changes on the lib they are wrong even on iOS 10

(Building with Xcode 9)

dmiluski commented 7 years ago

@txaiwieser Are you manually laying out their sizes in layoutSubviews or something similar? Or leveraging auto layout for their sizing?

txaiwieser commented 7 years ago

Have you tried this using .groupped tableViews? all the sectionHeaders and sectionsFooters are now 0 height :/

Am I missing something?

dmiluski commented 7 years ago

@txaiwieser I'm experiencing the same thing with grouped table views. Which no longer offers default section header/footer height.

I had begun an alternative approach here, which reverts to previous implementation with an addition of potential for auto layout support: https://github.com/venmo/Static/pull/110

But ran into issues in which iOS11 was friendly to autosized sectionFooters, but iOS10 ended up clipping views, not respecting their auto layout provided intrinsic heights.

If you're on any public slack chats, would love to follow up with you there to see if we are experiencing the same thing. Otherwise, I can invite you to chat in the slack channel: iosdevelopers.slack.com

txaiwieser commented 7 years ago

@dmiluski Yes, I'm only on ios-developers.slack.com, but if you can sent me an invitation "txaidw@gmail.com"