Code Monkey home page Code Monkey logo

captain-morgans-notifications's Introduction

Captain Morgan's Notifications -- Advanced Lab

Instructions

  1. Check out what we have for you!

  2. You'll find that in order to add a new pirate or a new ship, our AddPirateViewController and AddShipViewController have to grab FISPiratesDataStore and call its methods. This makes the controllers highly dependent on each other... let's reduce this dependency.

  3. Make FISPiratesDataStore register to listen for NSNotifications.

  4. Make each of your "add" controllers broadcast an NSNotification with the information that they take from the user attached as an NSDictionary.

  5. Create categories on your Ship and Pirate classes, each with a convenience class method as shown below:

+(instancetype)shipFromDictionary:(NSDictionary *)dictionary
andContext:(NSManagedObjectContext *)context;

+(instancetype)pirateFromDictionary:(NSDictionary *)dictionary
andContext:(NSManagedObjectContext *)context;
```

Hint

Your NSNotificationCenter addObserver method should be placed inside of the init method of your FISPiratesDataStore. Don't forget to appropriately remove the observer as well!

View Captain Morgan's Notifications -- Advanced Lab on Learn.co and start learning to code for free.

captain-morgans-notifications's People

Contributors

chrisgonzgonz avatar fislabstest avatar fs-lms-test-bot avatar ipc103 avatar misterfifths avatar sarogers avatar zdrossman avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

captain-morgans-notifications's Issues

Handraise Issue - jmburges

Is a bit confused over the flow of notifications. We should write something about where to include the add observer

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.