ios - Creating Sections That Are Independent Of Each Other in UITableView -


let's have array [apple, orange, grape, , banana] , want them each have own section in uitableview each section has same structure. example each section allows user input amount , calories each item in array. there way make possible. i'm beginner , i'm having difficulties uitableview.

i'm close , know can use func "numberofsectionsintableview(tableview: uitableview) -> int" count of array number of sections want if 1 thing in 1 section affects others. explain more want user able enter amount of rows he/she wants add. if user enters 2 in 1 section add 2 rows every section instead of one.

you can creating dictionary , inserting each section data different array,here name array.i think code can out. try way

number of sections

section header


Comments