Skip to content
This repository was archived by the owner on Mar 10, 2022. It is now read-only.

Conversation

@andrewlloyd100
Copy link

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.

…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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this deleted? :)

Copy link
Author

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.

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?

Copy link
Author

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

Copy link
Contributor

@mariusc mariusc Oct 13, 2016

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.

@andrewlloyd100 andrewlloyd100 merged commit 7b29632 into swift-3.0 Oct 13, 2016
@andrewlloyd100 andrewlloyd100 deleted the buttonTitleColorBug branch October 13, 2016 13:44
jakobmygind pushed a commit that referenced this pull request Oct 13, 2016
Merge pull request #17 from nodes-ios/buttonTitleColorBug
andrewlloyd100 pushed a commit that referenced this pull request Oct 13, 2016
Revert "Merge pull request #17 from nodes-ios/buttonTitleColorBug"
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants