Keyboard and cursor show, but I can't type inside UITextFields and UITextViews

前端 未结 7 595
攒了一身酷
攒了一身酷 2020-11-30 06:45

On an iPad with iOS 6 GM. I have 6 UITextFields, 3 UITextViews, and a UIButton that triggers a popover/actionsheet.

When I select one of the UITextFields or UITextVie

7条回答
  •  醉酒成梦
    2020-11-30 07:38

    This is apparently bug in iOS 6. Just put [searchBar becomeFirstResponder]; into searchBarTextDidBeginEditing method:

    - (void)searchBarTextDidBeginEditing:(UISearchBar *)searchBar
    {
        if (!self.window.isKeyWindow) {
            [self.window makeKeyAndVisible];
        }
    }
    

    This solution works for me.

提交回复
热议问题