Skip to content

CarouselViewController

James Barrow edited this page Jan 29, 2017 · 1 revision

CarouselViewController


Direction

Declaration

Swift

enum Direction: Int


---

<br>

### collectionView


**Declaration**
> <sub>**Swift**</sub>  
> ```swift  
@IBOutlet public weak var collectionView: UICollectionView!


pageControl

Declaration

Swift

@IBOutlet public weak var pageControl: UIPageControl?

---

<br>

### numberOfPages


**Declaration**
> <sub>**Swift**</sub>  
> ```swift  
public var numberOfPages: Int


viewDidLoad()

Declaration

Swift

open override func viewDidLoad()


---

<br>

### willAnimateRotation(to:duration:)


**Declaration**
> <sub>**Swift**</sub>  
> ```swift  
open override func willAnimateRotation(to toInterfaceOrientation: UIInterfaceOrientation, duration: TimeInterval)


## UICollectionViewDataSource and UICollectionViewDelegate

numberOfSections(in:)

Declaration

Swift

open func numberOfSections(in collectionView: UICollectionView) -> Int


---

<br>

### collectionView(_:numberOfItemsInSection:)


**Declaration**
> <sub>**Swift**</sub>  
> ```swift  
open func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int


collectionView(_:cellForItemAt:)

Declaration

Swift

open func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell


---


<br>
## UICollectionViewDelegateFlowLayout  <br>

### collectionView(_:layout:sizeForItemAt:)


**Declaration**
> <sub>**Swift**</sub>  
> ```swift  
open func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize


viewWillTransition(to:with:)

Declaration

Swift

open override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator)


---


<br>
## UIPageControl Methods  <br>

### pageControlDidChange(_:)


**Declaration**
> <sub>**Swift**</sub>  
> ```swift  
public final func pageControlDidChange(_ sender: UIPageControl)


## UIScrollViewDelegate Methods

scrollViewDidScroll(_:)

Declaration

Swift

open func scrollViewDidScroll(_ scrollView: UIScrollView)


---

<br>

### scrollViewDidEndDecelerating(_:)


**Declaration**
> <sub>**Swift**</sub>  
> ```swift  
open func scrollViewDidEndDecelerating(_ scrollView: UIScrollView)


## Animation Methods

degreesToRadians(angle:)

Declaration

Swift

private func degreesToRadians(angle: CGFloat) -> CGFloat


---

<br>

### animate(view:percent:pageNumber:)


**Declaration**
> <sub>**Swift**</sub>  
> ```swift  
private func animate(view: UIView, percent: CGFloat, pageNumber: Int)

Clone this wiki locally