I create a toolbar over the keyboard to display done button. I am using sdk 4.2 to build the project however when it is rendered on device running iOS 4.2.1 the barbutton gets clipped. The same runs perfectly fine on device running on iOS 4.0.1,The same problem persist even when i run the same code in simulator for Retina display.
aToolBar = [[UIToolbar alloc] init];
aToolBar.tintColor = self.navigationController.navigationBar.tintColor;
UIBarButtonItem *whiteSpace = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace
target:nil action:nil]autorelease];
UIBarButtonItem *doneButton = [[[UIBarButtonItem alloc] initWithTitle:@"Done" style:UIBarButtonItemStyleBordered target:self action:@selector(doneButtonPressed)]autorelease];
aToolBar.items = [NSArray arrayWithObjects:whiteSpace,doneButton,nil];
CGRect myToolBarRect = CGRectMake(0, self.view.frame.size.height-248, 320, 32);
aToolBar.frame = myToolBarRect;
[self.view addSubview:aToolBar];

any clues in this ???
Strange. This behavior is triggered on any height lesser than 44. Whether this is intentional, its hard to tell as I couldn’t find any documentation on it but Apple (in the HIG) does recommend using a minimum height of 44 as any smaller would make it difficult for the users to interact.