# CCActionFadeTo Class Reference

Inherits from | CCActionInterval : CCActionFiniteTime : CCAction : NSObject
Conforms to | NSCopying
Declared in | CCActionInterval.h

## Overview

This action fades the target, it modifies the opacity from the current value to the specified value. Notes: Works with cascadeOpacity, if you want children to fade too.

## Tasks

- `+ actionWithDuration:opacity:`
- `– initWithDuration:opacity:`

## Class Methods

### actionWithDuration:opacity:

Creates a fade action.

`+ (id)actionWithDuration:(CCTime)duration opacity:(CGFloat)opactiy`

#### Parameters

duration

  Action duration.

opactiy

  Opacity to fade to.

#### Return Value

New fade action.

#### Declared In

`CCActionInterval.h`

## Instance Methods

### initWithDuration:opacity:

Initalizes a fade action.

`- (id)initWithDuration:(CCTime)duration opacity:(CGFloat)opacity`

#### Parameters

duration

  Action duration.

opacity

  Opacity to fade to.

#### Return Value

New fade action.

#### Declared In

`CCActionInterval.h`