# Titanium.UI.iOS.CoverFlowView

> The cover flow view is a container showing animated three-dimensional images in a style consistent with the former cover flow presentation style used for iPod, iTunes, and Finder.

- Source: https://titaniumsdk.com/docs/sdk/13.1.0/Titanium.UI.iOS.CoverFlowView
- Titanium SDK version: 13.1.0
- Kind: view
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK iPhone 0.8, iPad 0.8, macOS 9.2.0
- Extends: Titanium.UI.View
- Inheritance: Titanium.UI.View > Titanium.Proxy

The cover flow view is created by the [Titanium.UI.iOS.createCoverFlowView](https://titaniumsdk.com/docs/sdk/Titanium.UI.iOS.md#createCoverFlowView) method or 
**`<CoverFlowView>`** element in an Alloy application.

## Example: Simple 3 image cover flow example

Create a simple cover flow view.

``` js
var view = Titanium.UI.iOS.createCoverFlowView({
  backgroundColor:'#000',
  images:['a.png','b.png','c.png']
});
window.add(view);
```

## Example: Alloy XML Markup

Previous example as an Alloy view.

``` xml
<Alloy>
    <Window id="window">
        <CoverFlowView id="view" platform="ios" backgroundColor="#000">

            <!-- The Images tag sets the CoverFlowView.images property. -->
            <Images>

                <!-- Assign the image by node text or the image attribute. -->
                <!-- Can also specify the width and height attributes. -->

                <Image>a.png</Image>
                <Image>b.png</Image>
                <Image>c.png</Image>

            </Images>

            <!-- Place additional views for the CoverFlowView here. -->

        </CoverFlowView>
    </Window>
</Alloy>
```

## Properties

### images

- Type: Array<String> | Array<Titanium.Blob> | Array<Titanium.Filesystem.File> | Array<CoverFlowImageType>
- Platforms: iPhone, iPad, macOS

Images to display in the view.

In an Alloy application, you can use a `<Images>` element.

### selected

- Type: Number
- Platforms: iPhone, iPad, macOS

Index to make selected.

## Methods

### setImage

- Platforms: iPhone, iPad, macOS

Changes the image for a specified index.

To specify a size for the image, you may pass the image as a simple dictionary, as defined 
in [CoverFlowImageType](https://titaniumsdk.com/docs/sdk/CoverFlowImageType.md).  If you specify a size, the size must be exact, not a
percentage size. 

If the image is passed as a `File` object or file path, the filename is checked. If the 
filename includes the '@2x' or '@3x' string used to identify high-resolution images for the Retina (HD) 
display, the image is treated accordingly.

Parameters:

- `index` (Number): Index to add the image at.
- `image` (String | Titanium.Blob | Titanium.Filesystem.File | CoverFlowImageType): Image to add at this index.

## Events

### change

- Platforms: iPhone, iPad, macOS

Fired when the user changes the image using a gesture.

Event properties:

- `index` (Number): Index of the image that is now visible.
- `previous` (Number): Index of the previously-visible image.

### click

- Platforms: iPhone, iPad, macOS

Fired when the user clicks on the view.

Event properties:

- `index` (Number): Index of the image that is now visible.
- `previous` (Number): Index of the previously-visible image.

## Inherited members

61 members are inherited. Each is documented on the type that declares it.

- [Titanium.Proxy](https://titaniumsdk.com/docs/sdk/13.1.0/Titanium.Proxy.md): `addEventListener`, `apiName`, `applyProperties`, `bubbleParent`, `fireEvent`, `removeEventListener`
- [Titanium.UI.View](https://titaniumsdk.com/docs/sdk/13.1.0/Titanium.UI.View.md): `accessibilityHidden`, `accessibilityHint`, `accessibilityLabel`, `accessibilityValue`, `anchorPoint`, `animate`, `animatedCenter`, `backgroundColor`, `backgroundGradient`, `backgroundImage`, `backgroundLeftCap`, `backgroundRepeat`, `backgroundSelectedColor`, `backgroundTopCap`, `borderColor`, `borderRadius`, `borderWidth`, `bottom`, `center`, `clearMotionEffects`, `clipMode`, `convertPointToView`, `getViewById`, `height`, `hide`, `horizontalMotionEffect`, `horizontalWrap`, `id`, `insertAt`, `keypressed`, `layout`, `left`, `opacity`, `postlayout`, `previewContext`, `pullBackgroundColor`, `rect`, `right`, `rotate`, `rotation`, `show`, `size`, `tintColor`, `toImage`, `tooltip`, `top`, `touchEnabled`, `transform`, `verticalMotionEffect`, `viewShadowColor`, `viewShadowOffset`, `viewShadowRadius`, `visible`, `width`, `zIndex`

---

- This corpus documents Titanium SDK 13.4.1. Anything here that does not name a version describes 13.4.1.
- Titanium is maintained by TiDev. The Appcelerator toolchain is retired: there is no `appc` CLI, no Appcelerator Studio and no hosted build service. The supported CLI is `titanium` on npm, invoked as `ti`.

