• 20 heures
  • Moyenne

Ce cours est visible gratuitement en ligne.

course.header.alt.is_video

course.header.alt.is_certifying

J'ai tout compris !

Mis à jour le 29/06/2020

Understand Table Customization and Notifications

Connectez-vous ou inscrivez-vous gratuitement pour bénéficier de toutes les fonctionnalités de ce cours !

Compétences évaluées

  • Implement local notifications
  • Implement custom reusable components
  • Question 1

    How can a cell with custom functionality be implemented?

    • By connecting the UI elements of the cell in the storyboard to the view controller code that correspond to the screen with table view.

    • By subclassing  UITableView  class and connecting cell's UI components to the code of the subclass

    • By subclassing  UITableViewCell  class and connecting cell's UI components to the code of the subclass .

    • By implementing a protocol that a cell must comply to.

  • Question 2

    How can cell content be accommodated that is of a dynamic size?

    • By using maximum possible size for each element on the storyboard.

    • It's handled automatically by UITableView functionality.

    • Creating different cell prototypes for each size possibility.

    • Using Auto Layout, using priority of constraints to accommodate dynamic in content size variations.

  • Question 3

    Select the true statements regarding using delegation in table cell - view controller relationship: 

    Attention, plusieurs réponses sont possibles.
    • Delegation can be used to implement communication from table view cell subclass to the view controller.

    • To use delegation, a table cell subclass needs to declare a delegate of a required protocol that a view controller can be assigned to.

    • A view controller must comply to a required cell's protocol in order to handle cell's actions.

    • A cell must comply to a specified protocol in order to accept a view controller as a delegate of that protocol.