https://github.com/wyanassert/wyaddcoinanimation
https://github.com/wyanassert/wyaddcoinanimation
animation coin gather-coins
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/wyanassert/wyaddcoinanimation
- Owner: wyanassert
- Created: 2016-09-07T03:23:11.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-09-29T09:20:11.000Z (over 9 years ago)
- Last Synced: 2025-05-01T02:39:08.379Z (about 1 year ago)
- Topics: animation, coin, gather-coins
- Language: Objective-C
- Size: 3.43 MB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WYAddCoinAnimation
#### Produce some coins and then gather coins into a point

----
## how to use:
1. drag the directory `AddCoinView` into your project.
2. add header
```
#import "AddCoinAnimationManager.h"
```
3. use these code
```
@property (nonatomic, strong) AddCoinAnimationManager *addCoinAnimationManager;
- (AddCoinAnimationManager *)addCoinAnimationManager {
if(!_addCoinAnimationManager) {
_addCoinAnimationManager = [[AddCoinAnimationManager alloc] init];
_addCoinAnimationManager.snapRect = CGRectMake(300, 0, 20, 20);
_addCoinAnimationManager.displayRect = CGRectMake(0, 0, 300, 300);
_addCoinAnimationManager.maxDisplayAmount = 20;
_addCoinAnimationManager.delegate = self;
_addCoinAnimationManager.associatedView = self.view;
}
return _addCoinAnimationManager;
}
```
4. produce coins:
```
[self.addCoinAnimationManager addCoins:10;
```
5. gather coins to a point and dismiss
```
[self.addCoinAnimationManager popCoins:10];
```
6. Or, you just want to remove them
```
[self.addCoinAnimationManager removeCoins:10];
```
7. hide or show all the coins
```
[self.addCoinAnimationManager setCoinsHide:YES];
```
8. Force to stop and remove all the coins
```
[self.addCoinAnimationManager stop];
```
PS. Just download project and run the demo within.