Permalink
Browse files

Sample image aded to README.

  • Loading branch information...
1 parent c0595ed commit 6b0db7ad34f56a79379086f3fab87687cb0a2953 Damien Debin committed Aug 1, 2011
Showing with 20 additions and 3 deletions.
  1. +20 −3 README.markdown
  2. BIN README.png
View
@@ -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
--------------
@@ -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/)>.
View
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.