ios - addSubview not showing view -


i'm trying add uitextview cell following code:

func collectionview(collectionview: uicollectionview, cellforitematindexpath indexpath: nsindexpath) -> uicollectionviewcell {      let cell = collectionview.dequeuereusablecellwithreuseidentifier("message_cell" , forindexpath: indexpath) as! displaymessagecollectionviewcell      let messagetextview: uitextview = {         let textview = uitextview()         textview.font = uifont.systemfontofsize(18)         textview.text = chat_m[indexpath.row].text         textview.backgroundcolor = uicolor.clearcolor()         return textview     }()     cell.addsubview(messagetextview)     cell.backgroundcolor = uicolor.lightgraycolor()      return cell 

the problem is not visible on screen. have added using storyboard, problem occurred : uitextview in collectionview wrapping


Comments

Popular posts from this blog

c# - Class in a list -

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

Jdbc Odbc Driver error -