Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 07-01-2010, 12:20 PM   #26 (permalink)
Registered Member
 
Join Date: Jan 2010
Location: NYC
Posts: 37
Default

Quote:
Originally Posted by jonahgabriel View Post
Apple changed the class name of the keyboard subview, so this will never be true:

if([[keyboard description] hasPrefix:@"<UIKeyboard"] == YES)

Ahh that would do it. Happen to know the new name?
beleg_1998 is offline   Reply With Quote
Old 07-01-2010, 12:35 PM   #27 (permalink)
Registered Member
 
Join Date: Feb 2009
Posts: 165
Default

Quote:
Originally Posted by beleg_1998 View Post
Ahh that would do it. Happen to know the new name?
I don't offhand.

Just loop though the views and log the description to the console.
jonahgabriel is offline   Reply With Quote
Old 07-02-2010, 11:50 AM   #28 (permalink)
Registered Member
 
Join Date: Jan 2010
Location: NYC
Posts: 37
Default

Quote:
Originally Posted by jonahgabriel View Post
I don't offhand.

Just loop though the views and log the description to the console.
hmmmm. I tried that. Looks like the only description is UIlayoutContainerView, but since this is a undocumented part of the SDK my fear is if I use it then I will rejected by the itunes store.

anyone have any suggestions?
beleg_1998 is offline   Reply With Quote
Old 07-02-2010, 04:00 PM   #29 (permalink)
Registered Member
 
Join Date: Feb 2009
Posts: 165
Default

Quote:
Originally Posted by beleg_1998 View Post
hmmmm. I tried that. Looks like the only description is UIlayoutContainerView, but since this is a undocumented part of the SDK my fear is if I use it then I will rejected by the itunes store.

anyone have any suggestions?
You need to do it recursively.
jonahgabriel is offline   Reply With Quote
Old 07-08-2010, 12:54 PM   #30 (permalink)
Registered Member
 
Join Date: Jan 2010
Location: NYC
Posts: 37
Default

Quote:
Originally Posted by jonahgabriel View Post
You need to do it recursively.
I am not sure I follow you. I know what recursion is, but I am not sure how I would apply it to this situation.
beleg_1998 is offline   Reply With Quote
Old 07-08-2010, 01:12 PM   #31 (permalink)
Registered Member
 
Join Date: Feb 2009
Posts: 165
Post

You said:

Quote:
Originally Posted by beleg_1998 View Post
hmmmm. I tried that. Looks like the only description is UIlayoutContainerView, but since this is a undocumented part of the SDK my fear is if I use it then I will rejected by the itunes store.

anyone have any suggestions?
You only looped though the the first view. You need to also loop though all subviews of any views you find and any subviews of those views and so on, until you find the keyboard view.

Code:
-(void)keyboardWasShown
{
    for(UIView *subView in self.view.subviews)
    {
        [self checkViews:subView];
    }
}

-(void)checkViews:(UIView *)inView
{
    for(UIView *subView in inView.subviews)
    {
         NSLog( "ViewName: %@", [view desc] );
         //Look for keyboard name here, if name found, break
         [self checkViews:subView];
    }
}
Something like this should work.
jonahgabriel is offline   Reply With Quote
Old 09-13-2010, 12:54 PM   #32 (permalink)
Registered Member
 
Join Date: Sep 2010
Posts: 1
Default Help

[quote=Praveen]
Can you tell me where to add the below code?
Where ever I add it shows me a error message......

Code:
        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil];
        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardDidHide:) name:UIKeyboardDidHideNotification object:nil];
rhpraveen is offline   Reply With Quote
Old 09-13-2010, 01:06 PM   #33 (permalink)
Registered Member
 
Join Date: Feb 2009
Posts: 165
Default

[quote=rhpraveen;244990]
Quote:
Originally Posted by Praveen
Can you tell me where to add the below code?
Where ever I add it shows me a error message......

Code:
        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil];
        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardDidHide:) name:UIKeyboardDidHideNotification object:nil];
Depending on your app, either viewDidLoad or viewWillAppear.
jonahgabriel is offline   Reply With Quote
Old 09-24-2010, 06:23 AM   #34 (permalink)
Registered Member
 
Join Date: Oct 2008
Posts: 370
Default We can use this property inputAccessoryView - OS 3.2 and later.

Code:
UIToolbar *boolbar = [UIToolbar new];
		boolbar.barStyle = UIBarStyleDefault;
		[boolbar sizeToFit];
		
		
		UIBarButtonItem *cancelleftBarButton =[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(buttonClicked:)];
		NSArray *array = [NSArray arrayWithObjects:cancelleftBarButton, nil];
		[cancelleftBarButton release];
		[boolbar setItems:array];
		
		
		myTextField.inputAccessoryView = boolbar;
__________________
lazy blogs
The Lord's holy name be praised.
david_david is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 263
14 members and 249 guests
2WeeksToGo, AdamL, ADY, BrianSlick, Dani77, Dattee, headkaze, mer10, prchn4christ, smithdale87, timle8n1, Touchmint, vigu360
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,879
Threads: 89,228
Posts: 380,747
Top Poster: BrianSlick (7,129)
Welcome to our newest member, mgon987
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 12:51 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0