Fixes #12 by removing specific constraint code #23
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes issue #12.
The crash is caused because
ActionCell
is changing the priority from some constraints from Required to Optional and viceversa when they are already installed. This can happen when thesetup
method is called twice, and the second time passing a null image. These constraints control how the cell's title label is positioned taking into account if the cell has or not an image.I just removed these constraint from the base class
ActionCell
instead of trying to change the constraints properties in some way. I opted for removing them because they add specific dependent code on how the cell's UI is designed and should be out of the scope of this class. This way we are avoiding coupling XLActionController base code with specific actions' UI code.Note: this is a breaking change. If this PR is merged then, apps that are using these constraint it will crash with the exception "this class is not key value coding-compliant for the key..."