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
Post a Comment