GithubHelp home page GithubHelp logo

captain-morgans-notifications-ios-0615-public's Introduction

languages tags
objc
delegates, coredata, advanced

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, we our AddPirateViewController and AddShipViewController have to grab FISPiratesDataStore and call its methods. This makes the controllers highly dependent on eachother... let's reduce this dependency.

  3. Make FISPiratesDataStore register to listen for NSNotifications.

  4. Make each of your "add" controllers send 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 NSNotification addObserver method should be placed inside of the dispatch_once block of your FISPiratesDataStore singleton. Don't forget to appropriately remove the observer as well!

captain-morgans-notifications-ios-0615-public's People

Contributors

chrisgonzgonz avatar zdrossman avatar fs-lms-test-bot avatar fislabstest avatar griffinmacias avatar

Watchers

James Cloos avatar

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.