Coder Social home page Coder Social logo

iosbrain / nsnotificationcenter-demo Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 31 KB

NSNotificationCenter in Swift 4: Intra-app communication, sending, receiving, listening, stop listening for messages.

Home Page: http://iosbrain.com/blog/2018/02/09/nsnotificationcenter-in-swift-4-intra-app-communication-sending-receiving-listening-stop-listening-for-messages/

License: Other

Swift 100.00%
nsnotificationcenter post addobserver notifications listener listen receive send swift swift4

nsnotificationcenter-demo's Introduction

NSNotificationCenter-Demo

NSNotificationCenter in Swift 4: Intra-app communication, sending, receiving, listening, stop listening for messages.

This is pretty basic folks -- but still very important. In terms of communication and coordination between objects in your app, an age-old debate is whether to use delegation or messaging/notifications. I'll let you think about it.

Here’s the app we'll build:

alt text

Xcode 9 project settings

To get this project running on the Simulator or a physical device (iPhone, iPad), go to the following locations in Xcode and make the suggested changes:

  1. Project Navigator -> [Project Name] -> Targets List -> TARGETS -> [Target Name] -> General -> Signing
  • Tick the "Automatically manage signing" box
  • Select a valid name from the "Team" dropdown
  1. Project Navigator -> [Project Name] -> Targets List -> TARGETS -> [Target Name] -> General -> Identity
  • Change the "com.yourDomainNameHere" portion of the value in the "Bundle Identifier" text field to your real reverse domain name (i.e., "com.yourRealDomainName.Project-Name").

nsnotificationcenter-demo's People

Contributors

iosbrain avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

azuredark

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.