I read the Junior Objective-C developer questionnaire and meet the following question there:

The application retrieves data from the server that needs to be filtered and sorted by section for a UITableView. How to organize a solution in terms of MVC?

How would you answer this question?

    1 answer 1

    1. I would get an array for the sections, the sections themselves would be represented as a dictionary with two keys: the section header (string) and the contents (array).

    2. Would write a view method

      - (void)updateSectionsWithReceivedItems:(NSArray *)items_from_server; 

      in which I would parse the data obtained by a super-secret algorithm into sections (using, for example, NSPredicate to filter objects by some parameters), which I would write to the array conceived in step 1.

    3. Well, and then for the methods UITableViewDataSource

        – tableView:cellForRowAtIndexPath: – numberOfSectionsInTableView: – tableView:numberOfRowsInSection: – sectionIndexTitlesForTableView: – tableView:sectionForSectionIndexTitle:atIndex: – tableView:titleForHeaderInSection: – tableView:titleForFooterInSection: 

      used the formed array of sections.


    Generally an ambiguous question, as for me - not enough specifics.

    PS Tell me, what kind of profile and where can I find it?

    • I join the question about the questionnaire, also interesting - aknew
    • alterplay.com/job/serious-ios-developer-anketa.html is a questionnaire for a software development company in Kiev - AlexThumb
    • @AlexThumb, where is Junior ? I see only Serious so far :). - VioLet
    • they themselves found my extremely modest resume (an intern without work experience) and asked to fill out a questionnaire, so no one knows exactly what they mean by this phrase) - AlexThumb
    • On the topic: what is the use of MVC in the answer given? - AlexThumb pm