escoz/QuickDialog — pull request #464 by bartvandendriessche (2013-04-12 12:57:39+00:00)
Title: Make cells user interaction respect their element's enabled property

cell.userInteractionEnabled is now equal to the enabled property of the Element it belongs to.

This fixes a bug that still allowed you to select cells whose Elements had been disabled dynamically.

e.g.: Let's say we have 2 QPickerElements. The second QPickerElement changes it's options based on the value of the first. If the first QPickerElement value is empty, then the second QPickerElement should have no values, and should be disabled.

With this fix, you can set secondQPickerElement.enabled = NO and then use UITableView's reloadRowsAtIndexPaths:withRowAnimation to properly disable it in the UITableView.

This was not possible before, because the userInteractionEnabled property was only set correctly in the implementation of QButtonElement and QElement, which wasn't always reached because not all QElement subclasses call super (e.g. QPickerElement)