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
If you look at the reference link for the STAButton class. You'll notice that the original author baked in the capability to broadcast when the state of the button changes by hijacking Apple's UIControlEventState... enum, which I am not a fan of.
Implement this broadcasting capability by providing a method that the user of the button can use to register a block that gets called whenever the Button's state changes. The block should have 2 parameters, one for the old state value, and one for the new state value.
Bonus Points if you write a test case for this method (doesn't have to use KIF).
The text was updated successfully, but these errors were encountered:
If you look at the reference link for the STAButton class. You'll notice that the original author baked in the capability to broadcast when the state of the button changes by hijacking Apple's UIControlEventState... enum, which I am not a fan of.
Implement this broadcasting capability by providing a method that the user of the button can use to register a block that gets called whenever the Button's state changes. The block should have 2 parameters, one for the old state value, and one for the new state value.
Bonus Points if you write a test case for this method (doesn't have to use KIF).
—
Reply to this email directly or view it on GitHub.
Don't worry about writing unit tests for it. Instead ensure that it works as it should manually. You should be able to do that by placing an NSLog statement in the body of the registered block. Run the sample app and go to the STAButton view and you should be able to tie in demo-related test code in there to help validate that your work works. Unit tests should be done in a different commit altogether.
If you look at the reference link for the
STAButton
class. You'll notice that the original author baked in the capability to broadcast when the state of the button changes by hijacking Apple'sUIControlEventState...
enum, which I am not a fan of.Implement this broadcasting capability by providing a method that the user of the button can use to register a block that gets called whenever the Button's state changes. The block should have 2 parameters, one for the old state value, and one for the new state value.
Bonus Points if you write a test case for this method (doesn't have to use KIF).
The text was updated successfully, but these errors were encountered: