Skip to content

Commit

Permalink
Update README and add CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
neilkimmett committed Jan 29, 2014
1 parent 742b5ab commit f34ccae
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## v2.0.0
- updated for iOS7 (overlay is a translucent blur like `UIAlertView`)
- transitioned to ARC
- did unholy amounts of refactoring
- changed superclass to `UIControl` so target/action pattern can be used
- removed `delegate` which is now redundant thanks to target/action
- removed custom property `isOn`, use standard `selected` property now

## v1.0.0
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,29 @@ button.toggleOffBlock = ^(NKToggleOverlayButton *button) {
};
```
You can query the button's current state using
``` objective-c
button.isSelected;
```

You can update the button's state (without displaying the overlay, or triggering `toggleOnBlock`, `toggleOffBlock` or any target/action pairs to be called) using
``` objective-c
button.selected = YES;
```
This is useful for setting an initial state of the button.

You can programmatically set the button's state and optionally trigger the animated overlay using
``` objective-c
[button setSelected:YES animated:YES];
```
Finally, you can toggle the button's state (switch between on and off), and optionally display the animated overlay using
``` objective-c
[button toggleSelectedAnimated:YES];
```


## Contact

Find me on Twitter [@neilkimmett](http://www.twitter.com/neilkimmett), or drop me an email at neil at kimmett.me
Expand Down

0 comments on commit f34ccae

Please sign in to comment.