嗨有人可以帮帮我
我想在ios 9中隐藏键盘上的配件栏,它的工作发现到ios 8但在ios 9中我无法隐藏配件栏我厌倦了这段代码但它不能工作
for (UIView *possibleFormView in [keyboardWindow subviews]) {
if([[possibleFormView description] hasPrefix:@"<UIInputSetContainerView"])
{
for(UIView *view1 in possibleFormView.subviews)
{
if([[view1 description] hasPrefix:@"<UIInputSetHostView"])
{
for (UIView *peripheralView_sub in view1.subviews) {
//Hides the backdrop (iOS 8)
if ([[peripheralView_sub description] hasPrefix:@"<UIKBInputBackdropView"] ) {
[[peripheralView_sub layer] setOpacity:0.0];
}
if([[peripheralView_sub description] hasPrefix:@"<<_UIRemoteKeyboardPlaceholderView"])
{
CGRect newRect= peripheralView_sub.frame;
newRect.origin.y=44;
newRect.size.height=398-44;
peripheralView_sub.frame=newRect;
peripheralView_sub.clipsToBounds=false;
for(UIView *remoteKeyboardView in peripheralView_sub.subviews)
{
NSLog(@"Remote Key View %@",remoteKeyboardView);
}
}
if ([[peripheralView_sub description] hasPrefix:@"<UIWebFormAccessory"]) {
for (UIView *UIInputViewContent_sub in peripheralView_sub.subviews) {
CGRect …Run Code Online (Sandbox Code Playgroud)