Objective C, C++ Help Thread.

Discussion in 'iOS Development' started by MiG™, Dec 8, 2007.

  1. MiG™

    MiG™ New Member

    Joined:
    Oct 10, 2007
    Messages:
    93
    Likes Received:
    0
    Basically, thought it would be a good idea to post questions about code, specifics of code not working, or if you generally need help.

    Seem threads like this before and they work well, and can contain a LOT of useful functions and code sets for devices

    Please Register or Log in to view images



    Go on, ask away.

    Please Register or Log in to view images

  2. RazerM

    RazerM New Member

    Joined:
    Oct 4, 2007
    Messages:
    279
    Likes Received:
    5
    I don't know if there are many people on the forum that can answer these qustions, but I do have one...

    Using UIPreferencesTextTableCell, i can tap the screen and enter text, but how do I hide the keyboard again?

    I just need the function/call.
  3. SkylarEC

    SkylarEC Super Moderator Emeritus Staff Member

    Joined:
    Sep 19, 2007
    Messages:
    6,642
    Likes Received:
    129
    RazerM, I think this might just be what you are looking for:
    - (void) setKeyboardVisible: (BOOL)fp8
    or also
    - (void) setKeyboardVisible: (BOOL)fp8 animated: (BOOL)fp12

    As quoted in the source for MobileScrobbler:
    Code:
    - (void)tableRowSelected:(NSNotification *)notification
    {
    	switch([table selectedRow]) {
    		case 1:
    			[username becomeFirstResponder];
    			break;
    		case 2:
    			[password becomeFirstResponder];
    			break;
    		case 4:
    			[table setKeyboardVisible: FALSE];
    			[table selectRow:-1 byExtendingSelection:NO withFade:YES];
                    //And so on.
    }
  4. RazerM

    RazerM New Member

    Joined:
    Oct 4, 2007
    Messages:
    279
    Likes Received:
    5
    Ahhh i didn't look in UIPreferencesTable header documentation (iPhoneDevDocs.com), just UIPreferencesTextTableCell, I'll try it later and report back.
  5. RazerM

    RazerM New Member

    Joined:
    Oct 4, 2007
    Messages:
    279
    Likes Received:
    5
    I have a new problem...

    I have a UIPreferencesTextTableCell.

    I can detect taps on inidvidual rows through the use of tableRowSelected, but not with the TextTableCell (it works if I tap the "label" of thetext cell, but not when entering text.

    So I need a way to detect when a user starts entering text into a TextTableCell.

    Edit: I don't need to know anymore...

Share This Page