https://github.com/wave2future/MAConfirmButton
MAConfirmButton is an animated subclass of UIButton that replicates and improves upon the behavior of the AppStore “Buy Now” buttons. Built and animated with Core Animation layers, it is completely image free.
https://github.com/wave2future/MAConfirmButton
Last synced: 10 days ago
JSON representation
MAConfirmButton is an animated subclass of UIButton that replicates and improves upon the behavior of the AppStore “Buy Now” buttons. Built and animated with Core Animation layers, it is completely image free.
- Host: GitHub
- URL: https://github.com/wave2future/MAConfirmButton
- Owner: wave2future
- License: other
- Fork: true (mikeahmarani/MAConfirmButton)
- Created: 2011-07-07T02:25:37.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2011-06-29T04:47:28.000Z (almost 14 years ago)
- Last Synced: 2024-11-05T11:53:21.115Z (5 months ago)
- Language: Objective-C
- Homepage:
- Size: 110 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.textile
- License: LICENSE.txt
Awesome Lists containing this project
- awesome - MAConfirmButton - MAConfirmButton is an animated subclass of UIButton that replicates and improves upon the behavior of the AppStore “Buy Now” buttons. Built and animated with Core Animation layers, it is completely image free. (etc)
- awesome - MAConfirmButton - MAConfirmButton is an animated subclass of UIButton that replicates and improves upon the behavior of the AppStore “Buy Now” buttons. Built and animated with Core Animation layers, it is completely image free. (etc)
README
h1. MAConfirmButton
MAConfirmButton is an animated subclass of UIButton that replicates and improves upon the behavior of the AppStore "Buy Now" buttons.
!http://www.mikeahmarani.com/github/MAConfirmButton.png!
h2. Usage
I attempted to make this class as "drop-in" as possible since it is, after all, a subclass of UIButton. Your project must include the **QuartzCore** framework.
h3. Example
MAConfirmButton *confirmButton = [MAConfirmButton buttonWithTitle:@"Button Title" confirm:@"Confirm Title"];
[confirmButton addTarget:self action:@selector(action:) forControlEvents:UIControlEventTouchUpInside];
[confirmButton setTintColor:[UIColor blueColor]];
[confirmButton setAnchor:CGPointMake(270, 25)];
[self.view addSubview:confirmButton];h3. Init
+ (MAConfirmButton *)buttonWithTitle:(NSString *)disabledString confirm:(NSString *)confirmString;
+ (MAConfirmButton *)buttonWithDisabledTitle:(NSString *)disabledString;h3. Anchor
It is important that the anchor be set in order to position this button in the view you are adding it to (height\width of the frame are calculated automatically). For now, the anchor point is the **top right** and the button is always aligned right, like the AppStore.
- (void)setAnchor:(CGPoint)anchor;h3. Change State
- (void)disableWithTitle:(NSString *)disabledString;