-
Notifications
You must be signed in to change notification settings - Fork 4
Changes to how the button handles colors. Demo project added. #17
Conversation
…e will be shown with the new color. When the spinner finishes loading the colors will only be restored if they haven't been changed since showing the spinner. Demo Project added to Repo.
| let view = showSpinner(inView: button, style: style, color: color) | ||
|
|
||
| if let spinnerView = view as? SpinnerView { | ||
| spinnerView.userInteractionEnabledAtReception = button.isUserInteractionEnabled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this deleted? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its setting it twice, it sets it when you set the spinner in the showSpinner(inView:_ call. Because of this, it was causing the buttons user interaction to be disabled after the spinner was dismissed even though when the spinner was first shown, interaction was enabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andrewlloyd100 Ah, I see. Ok then :) Can you verify this thing also works for custom spinner?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I haven't added a custom spinner to the Demo yet actually so I'll do that now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, so that's where the problem came from. I thought I noticed yesterday that the button is still deactivated after the spinner is dismissed, but I didn't have the time to investigate too much. Thanks for solving this :D. We also need to update the Swift 2.3 branch with this fix now. Would be nice to have a test that catches this situation :D.
… Standard & Custom spinners.
Merge pull request #17 from nodes-ios/buttonTitleColorBug
Revert "Merge pull request #17 from nodes-ios/buttonTitleColorBug"
Now if button title color is updated once spinner is loading the title will be shown with the new color. When the spinner finishes loading the colors will only be restored if they haven't been changed since showing the spinner. Demo Project added to Repo.