JRG-Developer / AutoLayoutCells

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

Add Text View Cell to Demo Project #5

Closed JRG-Developer closed 9 years ago

JRG-Developer commented 9 years ago

@AnthonyMDev

Per our discussion, please add text view cell to the demo project in a permanent example (not just a hack)... maybe in another section?

I'm assigning this to you, as you have more experience working on it and a greater need to make sure it works than my projects currently do.

Thanks, Anthony!

AnthonyMDev commented 9 years ago

Sorry I haven't gotten to this yet. It's been a hectic week. I am going to do this ASAP.

AnthonyMDev commented 9 years ago

This has been completed on the 'textFieldDemo' branch.

There were some minor bugs in some of the Xibs that I've fixed is well. It took me a while to get this working. I forgot for a while that you need to set the ALCellValue on the text view cells on cell: valueChanged so that the sizing cell is configured with the current text of the cell.

Sorry for the delay.

JRG-Developer commented 9 years ago

Overall, good job. :+1:

I fixed some issues and cleaned up the code a bit; please take a look.

In particular, note that I had to change bottom constraint priorities on textView to prevent the auto layout engine from break constraints whenever the text view resized. Can you verify this doesn't cause issues in your project?

If it looks good to you, I'm okay with tagging and pushing this to trunk.

AnthonyMDev commented 9 years ago

@JRG-Developer This works for me. This seems to be due to a known bug in iOS 8. See: http://stackoverflow.com/questions/27197813/autolayout-is-complaining-about-leading-trailing-space-for-uiimageview and http://stackoverflow.com/questions/24750158/autoresizing-issue-of-uicollectionviewcell-contentviews-frame-in-storyboard-pro

The constraint priority being set to 999 is odd to me, because it seems that, in some situations, that may allow the cell to resize incorrectly by breaking that constraint. I am unable to create a situation in which that happens in the test project however, and I've tested in both iOS 8 and iOS 7 on the simulator.

So I'm alright with pushing this to the trunk. Please let me know once you've done so, so that I can implement the new version.

Thanks!

JRG-Developer commented 9 years ago

Thanks for sharing the links.

Yeah, it is odd, but auto layout is really just complaining about a difference of one/few pixels... per testing I've done, it appears to try to satisfy the constraints as best that it can prior to breaking any (it's not like the height will be some crazy wrong/small value).

I'm pushing this to live now...

:]

AnthonyMDev commented 9 years ago

Great. Thanks for all the help here @JRG-Developer! :+1:

JRG-Developer commented 9 years ago

Pushed to trunk as 0.5.1.