skip to Main Content

We can add UITableView delegate and datasource to UIViewController via storyboard and programmatically, so i want to know that is there any difference in app performance using one of this methods.

2

Answers


  1. No there is not any difference in terms of app performance. It is just a matter of preference.

    Login or Signup to reply.
  2. Of course a UITableView has only one and the same delegate and dataSource property.

    So the difference is what sets them: your code or the iOS code that instantiates a storyboard. Execution of both is similar in performance.

    But a storyboard is a textual file that needs to be processed at run-time before the iOS code to set the properties will be executed. When you set these table properties in the storyboard, this adds a little processing work.

    Since iOS is very fast at processing storyboards, the additional time for these two table properties is negligible.

    You should therefore not worry about performance and just do what you’d prefer.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search