Cannot convert value of type '(MapViewController).Type' (aka 'MapViewController.Type') to expected argument type 'UIView'
<p>I've got this error when I want to add a subview. As you can se in the codes where the error appears. I'm 
relatively new in programming so I need help. I'm writing in Swift and without using the storyboard. </p>

<p>Ignore where i wrote:    backgroundColor = UIColor.blueColor()</p>

<p>Edit: I have forgot to mention that I know what is causing the error. I know that the MapViewController is a UIViewController and i put it in a UIView. But I don't know how to make a solution.   </p>

<p>What I want is to add a <code>mapview</code> to an individual cell</p>

<pre><code>import UIKit
import MapKit

class MapCell1: MapCell, MKMapViewDelegate {



override func setupViews() {

    backgroundColor = UIColor.blueColor()

    addSubview(MapViewController) //Cannot convert value of type '(MapViewController).Type' (aka 'MapViewController.Type') to expected argument type 'UIView'

}



}

import UIKit

import MapKit

class MapViewController: UIViewController {

var window: UIWindow?
var mapView: MKMapView?

override func viewDidLoad() {
    super.viewDidLoad()

    self.window = UIWindow(frame: UIScreen.mainScreen().bounds)
    self.view.backgroundColor = UIColor.whiteColor()

    self.mapView = MKMapView(frame: CGRectMake(0, 20, (self.window?.frame.width)!, 300))
    self.view.addSubview(self.mapView!)


}

}
</code></pre>

<p>Here is the codes for MapCell:</p>

<pre><code>import UIKit


class MapCell: BaseCell, UICollectionViewDelegate {

    let collectionView: UICollectionView = {
    let layout = UICollectionViewFlowLayout()
    let cv = UICollectionView(frame: CGRectZero, collectionViewLayout: layout)
    cv.backgroundColor = UIColor.redColor()
    return cv
}()


        let cellId = "cellId"

override func setupViews() {
    super.setupViews()

    addSubview(collectionView)
    addconstraintsWithFormat("H:|[v0]|", views: collectionView)
    addconstraintsWithFormat("V:|[v0]|", views: collectionView)



}


}


And BaseCell: 

mport UIKit

class BaseCell: UICollectionViewCell {
    override init(frame: CGRect) {
    super.init(frame: frame)
    setupViews()
}

func setupViews() {

}

required init?(coder aDecoder: NSCoder) {
    fatalError("init(coder:) has not been implemented")

}

class BaseCell: UICollectionViewCell {


    func setupViews() {


    }




}

}
</code></pre>

<p><a href="http://i.stack.imgur.com/6GIZj.png" rel="nofollow">Here is the new error</a></p>