Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
There is sample code in that link. What are you having trouble with?

I was hoping to see the code in context.

I have this code to register to receive the notifications that I'm interested in:

Code:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(cancelKeyboard:) name:UIKeyboardWillShowNotification object:nil];

And I have the following code to handle my observing the notifications:

Code:
- (void) cancelKeyboard: (NSNotification *) notification
{
	UITextField *theTextField = [notification object];
	[theTextField resignFirstResponder];
}

My idea is that when the user touches a text field to enter the cursor there and to enter numbers that my buttons can be used instead of the keyboard. This is necessary as discussed in the following thread:
[link]
https://forums.macrumors.com/threads/900959/
[link/]

-- Kaydell
 
kaydell.leavitt, if you're not sure how to use that code I suggest stepping back and learning Objective-C in more detail.
 
kaydell.leavitt, if you're not sure how to use that code I suggest stepping back and learning Objective-C in more detail.

How do you know when to give that answer and when to give more help? For instance, if I look up the index in Programming in Objective-C 2.0, by Stephen G. Kochan, there's no mention of notifications.

I say this as someone who has been working on iPhone projects for almost a year. It seems there's always something new to learn, and every new thing has to start somewhere.

Thanks,
Steve
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.