         layout.minimumInteritemSpacing = 0
         
         collectionView = UICollectionView(frame: CGRectZero, collectionViewLayout:layout)
-        collectionView.setTranslatesAutoresizingMaskIntoConstraints(false)
+        collectionView.translatesAutoresizingMaskIntoConstraints = false
         collectionView.pagingEnabled = true
         
         let bundle = NSBundle(forClass: TNImageSliderViewController.classForCoder())

        collectionView.dataSource = self
        view.addSubview(collectionView)
    
        let horizontalConstraints = NSLayoutConstraint.constraintsWithVisualFormat("H:|[collectionView]|", options: nil, metrics: nil, views: ["collectionView":collectionView])
        let verticalConstraints = NSLayoutConstraint.constraintsWithVisualFormat("V:|[collectionView]|", options: nil, metrics: nil, views: ["collectionView":collectionView])
        
        view.addConstraints(horizontalConstraints)
        view.addConstraints(verticalConstraints)


    required public init(coder aDecoder: NSCoder) {
        
        super.init(coder: aDecoder)!
        
    }
    
