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

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

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -