Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 103 additions & 0 deletions README.es-ES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@


# SCWaterWave
la animación de ondas de agua con Objective-C

## Vista previa
![image](https://raw.githubusercontent.com/Aevit/SCWaterWave/master/screenshots/ios-wave-animation-3.gif)

---

## Propiedades y métodos públicos

```
/**
* Velocidad de la onda, a mayor valor, mayor velocidad
*/
@property (nonatomic, assign) CGFloat speed;

/**
* Profundidad de la onda, porcentaje relativo al view actual, valor entre 0 y 1
*/
@property (nonatomic, assign) CGFloat depthPercent;

/**
* Color de la onda
*/
@property (nonatomic, strong) UIColor *waveColor;


/**
* Iniciar la animación
*/
- (void)wave;

/**
* Detener la animación
*/
- (void)stop;
```

---

## Uso

copia la carpeta `SCWaveView` a tu proyecto, y luego escribe el código de la siguiente manera:

### Primer ejemplo

```
SCWaveView *aView = [[SCWaveView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
[self.view addSubview:aView];
aView.center = CGPointMake(self.view.center.x, self.view.center.y - 150);
aView.backgroundColor = [UIColor whiteColor];
aView.layer.borderColor = [UIColor lightGrayColor].CGColor;
aView.layer.borderWidth = 1.f;

aView.speed = 2;
aView.depthPercent = 0.65;
aView.waveColor = [UIColor colorWithRed:105/255.0 green:186/255.0 blue:241/255.0 alpha:1];

[aView wave];
```


### Segundo ejemplo

```
SCWaveView *aView = [[SCWaveView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
[self.view addSubview:aView];
aView.center = CGPointMake(self.view.center.x, self.view.center.y - 0);
aView.backgroundColor = [UIColor whiteColor];
aView.layer.borderColor = [UIColor lightGrayColor].CGColor;
aView.layer.borderWidth = 1.f;

aView.layer.cornerRadius = 50;
aView.clipsToBounds = YES;

aView.speed = 2;
aView.depthPercent = 0.65;
aView.waveColor = [UIColor colorWithRed:105/255.0 green:186/255.0 blue:241/255.0 alpha:1];

[aView wave];
```

### Tercer ejemplo

```
SCWaveMaskView *aView = [[SCWaveMaskView alloc] initWithFrame:CGRectMake(0, 0, 100, 100) bottomImage:[UIImage imageNamed:@"bottom"] upImage:[UIImage imageNamed:@"up"]];
[self.view addSubview:aView];
aView.center = CGPointMake(self.view.center.x, self.view.center.y + 150);
aView.backgroundColor = [UIColor whiteColor];

aView.speed = 3;
aView.depthPercent = 0.42;

[aView wave];
```

---

## Licencia

Este código se distribuye bajo los términos y condiciones de la [licencia MIT](https://raw.githubusercontent.com/Aevit/SCWaterWave/master/LICENSE).