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?
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?