6

I have a problem since I upgrade Xcode 4.4 to 4.5. When I launch my app, I have a search bar controller, when I click on it a keyboard appear like before but I can't write something with my Mac keyboard or with the simulator keyboard.

But, when I use my ShareKit button, a view appear from the toolbar. If I try to use my search bar controller after shown this ShareKit view it works !!

This methods are called :

- (void)searchDisplayControllerWillBeginSearch:(UISearchDisplayController *)controller
- (void)searchDisplayControllerDidEndSearch:(UISearchDisplayController *)controller

But this methods are not called, because keyboard it not responding and I can't type text.

-(BOOL)searchDisplayController:(UISearchDisplayController *)controller
shouldReloadTableForSearchString:(NSString *)searchString 
- (BOOL)searchDisplayController:(UISearchDisplayController *)controller
shouldReloadTableForSearchScope:(NSInteger)searchOption

But when I use this method :

- (IBAction)share:(id)sender
{
    if (!_url) {
    return;
}

    SHKItem *item = [SHKItem URL:_url title:@"Share this URL"];
    SHKActionSheet *actionSheet = [SHKActionSheet actionSheetForItem:item];

    // ShareKit detects top view controller (the one intended to present ShareKit UI)     automatically,
    // but sometimes it may not find one. To be safe, set it explicitly
    [SHK setRootViewController:self];

    [actionSheet showFromToolbar:self.navigationController.toolbar];
}

After I can use search bar keyboard.

Can someone help me please, because it was working perfectly before iOS 6 simulator ...

Thanks !

EDIT : Great thank you for you're help it works !!

I just check "Visible at launch" for my mainWindow.xib Window element and it works !

Hope this will help some others !

orsonn
  • 81
  • 1
  • 4
  • Nobody can help you unless you share the relevant portions of code. – borrrden Sep 21 '12 at 09:13
  • 4
    I had a similar problem. The answer to this question solved it for me: http://stackoverflow.com/questions/12447875/keyboard-and-cursor-show-but-i-cant-type-inside-uitextfields-and-uitextviews/12504575#12504575 – Stephen Darlington Sep 21 '12 at 09:50

1 Answers1

0

You need to set delegate properly. Write this line in ViewDidLoad

 SearchbarObj.delegate=self;

or set delegate connection to File's Owner in xib.

G Ganesh
  • 11
  • 1