Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7883555
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:33:49+00:00 2026-06-03T04:33:49+00:00

Is is standard to balance the ‘addObserver’ with: [[NSNotificationCenter defaultCenter] removeObserver:self] in the viewWillDisappear

  • 0

Is is standard to balance the ‘addObserver’ with:

[[NSNotificationCenter defaultCenter] removeObserver:self]

in the viewWillDisappear method?

For instance, when registering to receive the results of NSURLConnection events by a Data Manager class, triggered by different tabs of a TabBar (separate controllers). Each controller registers to be ‘notified’ of receiving results in viewDidLoad. Should each controller also unregister? It seems that if the name: of the notification is the same for all, it might cause a disaster when tab’s view reappears ??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T04:33:50+00:00Added an answer on June 3, 2026 at 4:33 am

    Every addObserver should have a remove observer. You should be very careful not to addObservers when an observer is already added, for instance in viewDidAppear observers can be added many times and then your observing selector will get called many times.

    Honestly, from the example you explain you should consider a delegate protocol. See that here:

    http://mobiledevelopertips.com/objective-c/the-basics-of-protocols-and-delegates.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The standard method to get the range of an Excel spreadsheet in use is
The standard string title() method in Python is pretty naive and doesn't correctly handle
Standard Fancybox places an overlay on the entire body. Is there a way in
Standard Java does not offer an object implementing the Queue interface on top of
Standard Entry Sequence : _function: push ebp ;store the old base pointer mov ebp,
standard power operation ( ** ) in Python does not work for negative power!
The standard specifies (23.4.4.2:5, etc.) that constructing all four ordered associative containers ( map
The standard data source configuration in JBoss requires the username and password of the
In standard SQL, is there a way to say: select mubmle as x from
The standard explicitly states that main has two valid (i.e., guaranteed to work) signatures;

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.