Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Sample image aded to README.
  • Loading branch information
ddebin committed Aug 1, 2011
1 parent c0595ed commit 6b0db7a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions README.markdown
@@ -1,10 +1,16 @@
DDExpandableButton
==============


Purpose
--------------

`DDExpandableButton` is a single-file iOS 3.0+ class designed to be used like an expandable `UIButton` ; as seen in the iOS Camera app for the *flash* button.

*Originally inspired by [ExpandyButton](https://github.com/iosdeveloper/ExpandyButton).*

![button samples](http://github.com/ddebin/DDExpandableButton/raw/master/README.png)


Properties
--------------
Expand Down Expand Up @@ -112,11 +118,22 @@ The `DDExpandableButtonViewSource` protocol, used when you specify the title or
*Optional*, used to change appearance of selected items.


Usage
---------------

Example : a button with four text labels and a hook when value change.

NSArray *buttons = [NSArray arrayWithObjects:@"Black", @"Red", @"Green", @"Blue", nil];
DDExpandableButton *colorButton = [[[DDExpandableButton alloc] initWithPoint:CGPointMake(20, 70) leftTitle:@"Color" buttons:buttons] autorelease];
[[self view] addSubview:colorButton];
[colorButton addTarget:self action:@selector(toggleColor:) forControlEvents:UIControlEventValueChanged];


License
---------------

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see [http://www.gnu.org/licenses/](http://www.gnu.org/licenses/).
You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <[http://www.gnu.org/licenses/](http://www.gnu.org/licenses/)>.
Binary file added README.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6b0db7a

Please sign in to comment.