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 934543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T21:01:14+00:00 2026-05-15T21:01:14+00:00

I have a drill down navigation app with three levels of UIViewControllers. In each

  • 0

I have a drill down navigation app with three levels of UIViewControllers.
In each view controller, I have a UITextField where I am trying to subclass the UIKeyboard for each. My question is where to “set” notifications and “unset” them.

I have the notifications:

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillHide:) name:UIKeyboardWillHideNotification object:nil];

so it it best to set them in the viewDidLoad event? Or the viewWillAppear event?

And likewise for [[NSNotificationCenter defaultCenter] removeObserver:self];

I don’t want to have multiple keyboardWillShow: events to be called as I drill down.

Many thanks,
Brett

  • 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-05-15T21:01:14+00:00Added an answer on May 15, 2026 at 9:01 pm

    I suggest you put these in the init and dealloc methods, as the viewWillAppear and viewWillDisappear will be called every time the view appears or disappears, which is unnecessary for registering/deregistering notifications.

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

Sidebar

Related Questions

I have a core data application which uses a navigation controller to drill down
In my app I have a drill-down type interface as follows: My root view,
I have a navigation based application using Core Data and several levels of drill-down
I have a view controller that i'm trying to push onto the navigation stack.
I have three levels of ViewControllers that drill down from an overall category to
I have a UINavigationController in my iPhone app controlling views in a drill-down fashion.
I have a navigation app with 3 view controllers on the stack. The navigation
I'm working on an app that has table navigation to eventually drill down to
I basically just want to do ack foo *.citrus and have ack drill down
I have produced a report which allows you to drill down into the table

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.