<tfoot id='Ej9Si'></tfoot>

        <bdo id='Ej9Si'></bdo><ul id='Ej9Si'></ul>
    1. <small id='Ej9Si'></small><noframes id='Ej9Si'>

      <i id='Ej9Si'><tr id='Ej9Si'><dt id='Ej9Si'><q id='Ej9Si'><span id='Ej9Si'><b id='Ej9Si'><form id='Ej9Si'><ins id='Ej9Si'></ins><ul id='Ej9Si'></ul><sub id='Ej9Si'></sub></form><legend id='Ej9Si'></legend><bdo id='Ej9Si'><pre id='Ej9Si'><center id='Ej9Si'></center></pre></bdo></b><th id='Ej9Si'></th></span></q></dt></tr></i><div id='Ej9Si'><tfoot id='Ej9Si'></tfoot><dl id='Ej9Si'><fieldset id='Ej9Si'></fieldset></dl></div>

      <legend id='Ej9Si'><style id='Ej9Si'><dir id='Ej9Si'><q id='Ej9Si'></q></dir></style></legend>

        如何在 iOS 6 上找到 UIWebView 工具栏(以替换它们)?

        How to find UIWebView toolbar (to replace them) on iOS 6?(如何在 iOS 6 上找到 UIWebView 工具栏(以替换它们)?)

          <small id='zLipk'></small><noframes id='zLipk'>

          • <tfoot id='zLipk'></tfoot>
              <tbody id='zLipk'></tbody>
            <i id='zLipk'><tr id='zLipk'><dt id='zLipk'><q id='zLipk'><span id='zLipk'><b id='zLipk'><form id='zLipk'><ins id='zLipk'></ins><ul id='zLipk'></ul><sub id='zLipk'></sub></form><legend id='zLipk'></legend><bdo id='zLipk'><pre id='zLipk'><center id='zLipk'></center></pre></bdo></b><th id='zLipk'></th></span></q></dt></tr></i><div id='zLipk'><tfoot id='zLipk'></tfoot><dl id='zLipk'><fieldset id='zLipk'></fieldset></dl></div>

            1. <legend id='zLipk'><style id='zLipk'><dir id='zLipk'><q id='zLipk'></q></dir></style></legend>
                <bdo id='zLipk'></bdo><ul id='zLipk'></ul>

                • 本文介绍了如何在 iOS 6 上找到 UIWebView 工具栏(以替换它们)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我从另一个应用程序中尝试了以下代码,但没有找到任何东西.为什么?如何访问 UIWebView 工具栏?

                  I have tried the following code from another application but it doesn't find anything. Why? How to get access to the UIWebView toolbar?

                  - (UIToolbar *)findVirginWebKeyboardToolbar:(UIView *)parent
                  {
                      if ([parent isKindOfClass:[UIToolbar class]]) {
                          UIToolbar *tb = (UIToolbar *)parent;
                          if ([tb.items count] == 1 && [((UIBarButtonItem *)[tb.items objectAtIndex:0]).customView isKindOfClass:[UISegmentedControl class]]) {
                              return tb;
                          }
                      }
                      for (UIView *view in parent.subviews) {
                          UIToolbar *tb = [self findVirginWebKeyboardToolbar:view];
                          if (tb) return tb;
                      }
                      return nil;
                  }
                  
                  - (void)removeKeyboardBar {
                      UIView *keyboardWindow = nil;
                      for (UIWindow *testWindow in [[UIApplication sharedApplication] windows]) {
                          keyboardWindow = testWindow;
                          UIToolbar *toolbar = [self findVirginWebKeyboardToolbar:keyboardWindow/*subviewWhichIsPossibleFormView*/];
                          if (toolbar) {
                              itemsArray = [NSArray arrayWithObjects:button1, button2, button3, nil];
                              [toolbar setItems:itemsArray];
                          }
                      }
                  }
                  

                  推荐答案

                  通过以下代码,您应该能够移除键盘上方的工具栏.

                  With the following code you should be able to remove the toolbar that is above the keyboard.

                  -(void)viewWillAppear:(BOOL)animated{
                    [[NSNotificationCenter defaultCenter] addObserver:self
                                                          selector:@selector(keyboardWillShow:)
                                                              name:UIKeyboardWillShowNotification
                                                            object:nil];
                  }
                  
                  - (void)keyboardWillShow:(NSNotification *)note {
                    [self performSelector:@selector(removeBar) withObject:nil afterDelay:0];
                  }
                  - (void)removeBar {
                   // Locate non-UIWindow.
                   UIWindow *keyboardWindow = nil;
                   for (UIWindow *testWindow in [[UIApplication sharedApplication] windows]) {
                   if (![[testWindow class] isEqual:[UIWindow class]]) {
                      keyboardWindow = testWindow;
                      break;
                   }
                  }
                    // Locate UIWebFormView.
                    for (UIView *formView in [keyboardWindow subviews]) {
                    // iOS 5 sticks the UIWebFormView inside a UIPeripheralHostView.
                    if ([[formView description] rangeOfString:@"UIPeripheralHostView"].location != NSNotFound) {
                      for (UIView *subView in [formView subviews]) {
                          if ([[subView description] rangeOfString:@"UIWebFormAccessory"].location != NSNotFound) {
                              // remove the input accessory view
                              [subView removeFromSuperview];
                          }
                          else if([[subView description] rangeOfString:@"UIImageView"].location != NSNotFound){
                              // remove the line above the input accessory view (changing the frame)
                              [subView setFrame:CGRectZero];
                          }
                      }
                    }
                  }
                  }
                  

                  这篇关于如何在 iOS 6 上找到 UIWebView 工具栏(以替换它们)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  EAAccessory/EASession teardown during background(EAAccessory/EASession 在后台拆除)
                  Getting an NSArray of a single attribute from an NSArray(从 NSArray 获取单个属性的 NSArray)
                  ImageIO: lt;ERRORgt; JPEG Corrupt JPEG data: premature end of data segment iphone - how to catch this?(ImageIO:lt;错误gt;JPEG 损坏的 JPEG 数据:iphone 数据段过早结束 - 如何捕捉到这个?)
                  How to get indexPath.row of tableView which is currently being displayed?(如何获取当前正在显示的 tableView 的 indexPath.row?)
                  Xcode iOS organizer submit to app store yields quot;The archive is invalidquot; error(Xcode iOS 管理器提交到应用商店产生“存档无效;错误)
                  MFMessageComposeViewController alloc returns nil(MFMessageComposeViewController alloc 返回 nil)
                    • <tfoot id='oUOYY'></tfoot>

                      <small id='oUOYY'></small><noframes id='oUOYY'>

                      • <bdo id='oUOYY'></bdo><ul id='oUOYY'></ul>

                          <tbody id='oUOYY'></tbody>
                          • <i id='oUOYY'><tr id='oUOYY'><dt id='oUOYY'><q id='oUOYY'><span id='oUOYY'><b id='oUOYY'><form id='oUOYY'><ins id='oUOYY'></ins><ul id='oUOYY'></ul><sub id='oUOYY'></sub></form><legend id='oUOYY'></legend><bdo id='oUOYY'><pre id='oUOYY'><center id='oUOYY'></center></pre></bdo></b><th id='oUOYY'></th></span></q></dt></tr></i><div id='oUOYY'><tfoot id='oUOYY'></tfoot><dl id='oUOYY'><fieldset id='oUOYY'></fieldset></dl></div>
                          • <legend id='oUOYY'><style id='oUOYY'><dir id='oUOYY'><q id='oUOYY'></q></dir></style></legend>