     }
     
     public class func dequeueReusableCellFromCollectionView(collectionView: UICollectionView, indexPath: NSIndexPath) -> Self {
-
-        let cell = collectionView.dequeueReusableCellWithReuseIdentifier(cellIdentifier, forIndexPath: indexPath)
-        return cast(cell)!
+        return collectionView.dequeueReusableCellForIndexPath(indexPath)
     }
 }
 

    }
    
    public class func dequeueReusableCellFromTableView(tableView: UITableView) -> Self? {
        let cell = tableView.dequeueReusableCellWithIdentifier(cellIdentifier)
        return cast(cell)
    }
    
    public class func dequeueReusableCellFromTableView(tableView: UITableView, indexPath: NSIndexPath) -> Self {
        let cell = tableView.dequeueReusableCellWithIdentifier(cellIdentifier, forIndexPath: indexPath)
        return cast(cell)!
    }
}


        return fromStoryboard(UIStoryboard(name: name, bundle: nil))
    }
    public class func fromStoryboard(storyboard: UIStoryboard) -> Self? {
        return controllerFromStoryboard(storyboard)
    }
}

private func controllerFromStoryboard<T: UIViewController>(storyboard: UIStoryboard) -> T? {
    return T.fromStoryboard(storyboard, identifier: T.className) as? T
}

// MARK: NSCoding
