mochidev / MDSpreadView

A 2D table view for iOS apps!
https://github.com/mochidev/MDSpreadViewDemo
128 stars 49 forks source link

support for autolayout #31

Open tcurdt opened 10 years ago

tcurdt commented 10 years ago

With autolayout the views usually have a zero size before the frame gets assigned by the system. Which causes an NSAssert at least in with version '~> 0.8' (which is the latest version on cocoapods)

https://github.com/mochidev/MDSpreadView/blob/master/Classes/MDSpreadView.m#L2114

I haven't tried master or 0.9 yet.

tcurdt commented 10 years ago

Same in 0.9

dimitribouniol commented 10 years ago

I just pushed a fix that works around the issue when the size was previously 0 in one direction or another. In my use case, it was specifically for a height that equalled that of the table header, so please test it to make sure it works when the frame size is 0 as well.

tcurdt commented 10 years ago

Thanks. Will give it a try.

dimitribouniol commented 10 years ago

Does this work correctly now?

tcurdt commented 10 years ago

Sorry, didn't get around to test it yet. Still using the hack I put in place.