swift - How can numberOfRowsInSection function of TableView return multiple values for the same section? -


enter image description herehere, have tableview 1 section. however, have 2 cells. want numberofrowsinsection return 2 different values different rows of same section. but, can't access row in numberofrowsinsection function. can please tell me how attain this?

enter image description here

numberofrowsinsections should return count of cells in section, if want display 2 different type of cell (ex. celltype1 , celltype2), should logic inside

- (uitableviewcell *)tableview:(uitableview *)tableview      cellforrowatindexpath:(nsindexpath *)indexpath{     if (indexpath.section == 0) {        if(indexpath.row == 0){ return celltype1; }        if (indexpath.row == 1) { return celltype2; }     } } 

you can't return multiple values method, apple has not written method return multiple values


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -