Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
I ios-tutorial
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ios-general
  • ios-tutorial
  • Wiki
  • delegation

delegation · Changes

Page history
ar.kalmykov created page: delegation authored Nov 19, 2016 by Artem Kalmykov's avatar Artem Kalmykov
Hide whitespace changes
Inline Side-by-side
Showing with 21 additions and 0 deletions
+21 -0
  • delegation.md delegation.md +21 -0
  • No files found.
delegation.md 0 → 100644
View page @ 40504cc2
# Delegation
https://www.tutorialspoint.com/ios/ios_delegates.htm
## You should do the following:
1. Create a branch from develop, called feature/delegation.
2. Add “+” button to `MainViewController` in navigation bar, created as `UIBarButtonItem`.
3. Create a new view controller called `CreateEmployeeViewController`, which should contain 3 text fields - first name, last name and salary - a label next to each one, describing what those text fields are.
4. Add a handler for “+” button so it shows `CreateEmployeeViewController`.
5. Add “Save” button to the navigation bar of `CreateEmployeeViewController`, which reads the text fields, creates a new instance of `Employee`, returns it to `MainViewController` and is added to the current organization. Table view of `MainViewController` should be reloaded and should display newly created employee. Use the delegation pattern.
6. Create a pull request from your branch to develop.
## You should be able to answer the following questions:
* What is a protocol?
* What is the difference between required and optional methods?
* May protocols be inherited?
* What is a weak property? Why is it commonly used with delegates?
* What are the options of reloading data in a table view?
* Are there any other ways of passing the data, except of delegation?
Clone repository
  • autolayout
  • basic core data
  • basic networking
  • cocoapods
  • delegation
  • gcd and math
  • git tutorial
  • Home
  • ios basics
  • notifications
  • objective c basics
  • swift
  • ui table view