You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to integrate DLRadioButton in our project and I'm adding snapshot tests for a view containing the button. I face the issue with snapshot not accounting the radio icon and etc.. After studying the sources I believe that the current implementation of -drawButton: just schedules the changes in the appearance/layout vs. result in the real icon rendered, that sounds like misuse of API (-drawRect:).
I tried to solve the issue by moving the code to -layoutSubviews and that kind of eliminated the problem with snapshot/made the whole thing behave as expected. I had to disable check for accessibilityIdentifier though - if somebody could clarify the rationale for the check that would be great.
Would you mind PR addressing this problem?
The text was updated successfully, but these errors were encountered:
grigorye
changed the title
Is it good idea to change layout attributes in -drawRect?
Is it good idea to change layout/appearance attributes in -drawRect?
Jun 15, 2019
DLRadioButton/DLRadioButton/DLRadioButton.m
Line 78 in 6dbc907
I'm trying to integrate DLRadioButton in our project and I'm adding snapshot tests for a view containing the button. I face the issue with snapshot not accounting the radio icon and etc.. After studying the sources I believe that the current implementation of
-drawButton:
just schedules the changes in the appearance/layout vs. result in the real icon rendered, that sounds like misuse of API (-drawRect:
).I tried to solve the issue by moving the code to -layoutSubviews and that kind of eliminated the problem with snapshot/made the whole thing behave as expected. I had to disable check for accessibilityIdentifier though - if somebody could clarify the rationale for the check that would be great.
Would you mind PR addressing this problem?
The text was updated successfully, but these errors were encountered: