ios - insert row in a table view without storing datasource in code -


i have drawn tableview in storyboard static cells , multiple sections. 6 sections each has proper number of static cells. in code, in mytableviewcontroller not implement of datasource or delegate methods, logically means not have model in code, array or whatever datasource methods use populate number of sections or number of rows in section. question is: possible insert row of sections?

i read lot of stack questions. of them based on having model array or dictionary plays role in datasource methods construct table.

i have table constructed in storyboard. can number of sections tableview.numberofsections() example. means model stored somewhere sure. need proper method access model.

there reason uitableview works way datasource protocol. allows ios use needed display on screen @ given time scroll through table, making efficient. without implementing required methods, ios not know how rebuild cell if scroll off screen , on.

if don't need complexity (and really, isn't complex , can implement required methods in less time taking me respond), use uistackview inside of uiscrollview. allow add set of ui components vertically down screen, complete scrolling.

can explain why don't want implement uitableviewdatasource protocol?


Comments