Skip to content

Instantly share code, notes, and snippets.

@mluton
Last active October 13, 2016 16:58
Show Gist options
  • Select an option

  • Save mluton/e2f109883a0eadd77459adc1438e1bbe to your computer and use it in GitHub Desktop.

Select an option

Save mluton/e2f109883a0eadd77459adc1438e1bbe to your computer and use it in GitHub Desktop.

Revisions

  1. mluton revised this gist Oct 13, 2016. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion background-notifications.m
    Original file line number Diff line number Diff line change
    @@ -2,4 +2,6 @@

    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(methodName) name:UIApplicationWillEnterForegroundNotification object:nil];

    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(methodName) name:UIApplicationDidEnterBackgroundNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(methodName) name:UIApplicationDidEnterBackgroundNotification object:nil];

    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(methodName) name:UIApplicationWillResignActiveNotification object:nil];
  2. mluton renamed this gist Oct 13, 2016. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion gistfile1.txt → background-notifications.m
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(methodName) name:UIApplicationDidBecomeActiveNotification object:nil];

    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(methodName) name:UIApplicationWillEnterForegroundNotification object:nil];

    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(methodName) name:UIApplicationDidBecomeActiveNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(methodName) name:UIApplicationDidEnterBackgroundNotification object:nil];
  3. mluton revised this gist Oct 11, 2016. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1 +1,3 @@
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(methodName) name:UIApplicationWillEnterForegroundNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(methodName) name:UIApplicationWillEnterForegroundNotification object:nil];

    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(methodName) name:UIApplicationDidBecomeActiveNotification object:nil];
  4. mluton created this gist Oct 11, 2016.
    1 change: 1 addition & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(methodName) name:UIApplicationWillEnterForegroundNotification object:nil];