Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS8 today extension, button deselects itself after touch. #14

Open
jtoronto opened this issue Dec 16, 2014 · 1 comment
Open

iOS8 today extension, button deselects itself after touch. #14

jtoronto opened this issue Dec 16, 2014 · 1 comment

Comments

@jtoronto
Copy link

I'm having a problem when using MRoundedButton in an iOS8 today extension. Sometimes the button would immediately deselect itself upon selection. I found that setSelected being called twice, is what's causing it. It's set to "YES" when beginTrackingWithTouch is called and then set to "NO" when endTrackingWithTouch is called. Additionally I found that sometimes beginTrackingWithTouch is called twice. I'm assuming this is an iOS8 bug. For now I commented out the code that performs the selection in the methods:

beginTrackingWithTouch
continueTrackingWithTouch
endTrackingWithTouch

and I'm performing the selection manually in my action method by calling [sender setSelected:YES] or NO depending on the situation and it seems to be working fine.

@mrcrow
Copy link
Owner

mrcrow commented Jan 9, 2015

Hi @jtoronto , I think you can try to set restoreSelectedState to NO first, this is used to disable the selected state been restored when endTrackingWithTouch finished

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants