iphone - UITableView adding cells dynamically -


i have uitableview in nib file , dynamically add content each of cells in tableview. there way this? have array of text display in tableview array of pictures.

you need implement uitableviewdatasource protocol , override the

- (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath 

and

- (nsinteger)tableview:(uitableview *)tableview numberofrowsinsection:(nsinteger)section 

methods. want return length of array tableview:numberofrowsinsection: method. in tableview:cellforrowatindexpath: method create uitableviewcell (dequeue 1 if available) , add uiviews want hold data (i.e. uiimage, etc.). access data populate view using indexpath.row index array(s). make sense? sounds bit more complicated in practice.

here documentation uitableviewdatasource protocol


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -