Custom Keyboard InputAccessoryView not visible in iOS 11

前端 未结 7 1984
攒了一身酷
攒了一身酷 2021-02-18 21:30

I have implemented Custom input accessory view it was working fine till iOS 10.3.1. But it\'s not visible in iOS 11 beta.

Have anyone experience this issue?

7条回答
  •  忘了有多久
    2021-02-18 21:56

    Beta 3 has just come out and some people said it solved the problem, but for me it didn't.

    However I tried setting the accessory view to something stupid (100pxls high) and spotted that the Undo/Redo/Paste bar on the iPads was incorrectly sitting over the top of my accessory bar. So I added the following code to get rid of Apples bar (it was pointless for my custom picker anyway) and the problem went away

    Hope this helps somebody

    - (void)textFieldDidBeginEditing:(UITextField*)textField  
    {  
        UITextInputAssistantItem* item = [textField inputAssistantItem];  
        item.leadingBarButtonGroups = @[];  
        item.trailingBarButtonGroups = @[];  
    }  
    

提交回复
热议问题