добавление настраиваемого для uiviewcontroller, чтобы подпанель программно, но получаю сообщение об ошибке “не удается преобразовать значение типа...”

uiviewcontrolleruipickerviewviewcontrollerswift

я пытаюсь добавить пользовательский класс () в мои основные программно в (без раскадровки), но я получаю следующее сообщение об ошибке...

"cannot convert value of type 'habitviewviewcontroller' to expected argument type 'uiview'

custom uipicker class:
    import uikit    class habitviewcontroller: uiviewcontroller,uipickerviewdatasource,uipickerviewdelegate  {        @iboutlet weak var mypicker: uipickerview!        @iboutlet weak var mylabel: uilabel!        let pickerdata = ["mozzarella","gorgonzola","provolone","brie","maytag blue","sharp cheddar","monterrey jack","stilton","gouda","goat cheese", "asiago"]        override func viewdidload() {            super.viewdidload()            mypicker.delegate = self            mypicker.datasource = self        }        //mark: - delegates and data sources        //mark: data sources        func numberofcomponents(in pickerview: uipickerview) -> int {            return 1        }        func pickerview(_ pickerview: uipickerview, numberofrowsincomponent component: int) -> int {            return pickerdata.count        }        //mark: delegates        func pickerview(_ pickerview: uipickerview, titleforrow row: int, forcomponent component: int) -> string? {            return pickerdata[row]        }        func pickerview(_ pickerview: uipickerview, didselectrow row: int, incomponent component: int) {            mylabel.text = pickerdata[row]        }        func pickerview(_ pickerview: uipickerview, attributedtitleforrow row: int, forcomponent component: int) -> nsattributedstring? {            let titledata = pickerdata[row]            let mytitle = nsattributedstring(string: titledata, attributes: [nsfontattributename:uifont(name: "georgia", size: 26.0)!,nsforegroundcolorattributename:uicolor.blue])            return mytitle        }        func pickerview(_ pickerview: uipickerview, viewforrow row: int, forcomponent component: int, reusing view: uiview?) -> uiview {            var pickerlabel = view as! uilabel!            if view == nil {  //if no label there yet                pickerlabel = uilabel()                //color the label's background                let hue = cgfloat(row)/cgfloat(pickerdata.count)                pickerlabel?.backgroundcolor = uicolor(hue: hue, saturation: 1.0, brightness: 1.0, alpha: 1.0)            }            let titledata = pickerdata[row]            let mytitle = nsattributedstring(string: titledata, attributes: [nsfontattributename:uifont(name: "georgia", size: 26.0)!,nsforegroundcolorattributename:uicolor.black])            pickerlabel!.attributedtext = mytitle            pickerlabel!.textalignment = .center            return pickerlabel!        }    }
main uiview
    import uikit    // activity month view class (type basecell - cleaner)    class plantcell: basecell {        // uipicker for habit        let habitpicker: habitviewcontroller = {            let habit = habitviewcontroller()            return habit        }()        // overrided as it uses the basecell superclass        override func setupviews() {            // add subviews            addsubview(habitpicker)            // horizontal constraints            addconstraintswithformat(format: "h:|-[v0]-|", views: habitpicker)            // vertical constraints            addconstraintswithformat(format: "v:|-250-[v0(20)]", views: habitpicker)        }    }
basecell
    import uikit    // superclass to initalise all base uicollectionview cells    class basecell: uicollectionviewcell {        override init(frame: cgrect) {            // when dequeuereusablecell is called this init method is called if it needs a new cell            super.init(frame: frame)            setupviews()        }        func setupviews() {        }        required init?(coder adecoder: nscoder) {            fatalerror("init(coder:) has not been implemented")        }    }