Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

StevenHu

macrumors member
Original poster
Sep 3, 2009
80
0
Southern CA
I am using Apple's code for making the textfield move above the keyboard when tapped. Unfortunately, there's an error for "if (keyboardShown)" of:

error: "keyboardShown" undeclared (first use in this function)

My copy of Programming in Objective-C 2.0 does not tell me how to declare this in an if statement. Can you help? Here is the code portion.

Code:
// Called when the UIKeyboardDidShowNotification is sent.

- (void)keyboardWasShown:(NSNotification*)aNotification
{
    if (keyboardShown)
        return;
    NSDictionary* info = [aNotification userInfo];

The entire code is found here:
http://developer.apple.com/iphone/l....html#//apple_ref/doc/uid/TP40007072-CH20-SW7

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