久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

Phonegap iOS6:刪除表單助手欄的正確解決方案(上一

Phonegap iOS6: Proper solution to Remove form assistant bar (prev, next, done)(Phonegap iOS6:刪除表單助手欄的正確解決方案(上一個,下一個,完成))
本文介紹了Phonegap iOS6:刪除表單助手欄的正確解決方案(上一個,下一個,完成)的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

另一個如何刪除 pre、next、done 按鈕"-你可能會想到的問題.其實不是.我對此進行了一些相當徹底的研究并嘗試了不同的方法,但似乎沒有任何方法或解決方案真正正確.下面提到和顯示的所有解決方法(就是它們)基本上是相同的方法,替換 MainViewController.m 文件的內容.我很清楚所有這些提議的解決方案或多或少都有點hacky,但仍然應該有有人以一點優(yōu)雅和深思熟慮解決了這個問題,或者熟悉 C 并且可以提出更可靠的解決方案的人.

Another "how to remove the pre, next, done button" -question you may think. Not really actually. I've done some rather thorough research on this and tried out different approaches but no method or solution really seems to do it right. All workaround (that's what they are) mentioned and shown below are basically the same approach, replace content of the MainViewController.m file. I'm well aware of that more or less all these proposed solutions are somewhat hacky but still, there should be someone out there who has tackled this issue with a little bit of grace and deep thought, or someone who knows C well and can propose a more solid solution.

請允許我通過引用一些建議的解決方案來說明我的觀點:

Allow me to illustrate my point by making references to some proposed solutions:

在 iOS6 中,這會導致 表單助手欄邊框仍然存在,并且鍵盤的行為就像表單助手欄仍然存在一樣.

In iOS6, this results in the form assistant bar border still being present and the keyboard acting as if the form assistant bar were still there.

有人提出了上述問題的解決方案,但我根本無法讓它發(fā)揮作用.回答者對帖子進行了多次編輯和評論,這只會讓您更難掌握在哪里做什么.我已經嘗試了他解決方案的所有變體,但我總是遇到嚴重錯誤,而項目只是無法編譯.

Someone proposed a solution to the above but I simply cannot get it to work. The answerer has made several edits and comments to the post which only make harder to grasp what to do where. I've tried all variations of his solution but I always end up getting a critical error and the project simply wont compile.

不是 C 程序員(這就是我使用 phonegap 的原因)所以不能讓它正常工作.不知道在哪里添加什么.

Not a C programmer (that's why I use phonegap) so can't get this to work properly. Don't know what to add where.

不知道在哪里以及如何實現這一點,所以沒有嘗試過.我應該在哪里注冊以接收keyboardDidShow 通知?我應該在哪里添加該功能?

Don't know where and how to implement this so haven't tried it. Where should I register to receive the keyboardDidShow notification? Where should I add the function?

根據我的研究,如果您愿意的話,目前還沒有人提出適當的解決方案.那么有沒有人成功刪除表單助手而沒有上述任何副作用?

According to my research, if you will, no one has yet proposed a proper solution to this. So has anyone successfully removed the form assistant without any of the above mentioned side effects?

推薦答案

給你,我正在我正在開發(fā)的應用程序中使用它.祈禱它可以進入應用商店,盡管通過其他黑客"進入商店這并不比其他人差,所以應該有一個公平的機會.

Here you go, I'm using this in an app I'm currently developing. Fingers crossed that it gets to the app store, although going on other 'hacks' that make it to the store this is no worse than others, so should stand a fair chance.

這種方法沒有煩人的副作用 - 它通過確保從一開始就從未創(chuàng)建它來干凈地刪除欄.噠噠!

No annoying side effects with this method - it cleanly removes the bar by making sure it's never created in the first place. Ta da!

感謝 https://gist.github.com/2048571,這是他的代碼,有一個小修復.

Credit goes to https://gist.github.com/2048571, this is his code with a small fix.

#import <objc/runtime.h>
#import <UIKit/UIKit.h>

@interface UIWebView (HackishAccessoryHiding)
@property (nonatomic, assign) BOOL hackishlyHidesInputAccessoryView;
@end

@implementation UIWebView (HackishAccessoryHiding)

static const char * const hackishFixClassName = "UIWebBrowserViewMinusAccessoryView";
static Class hackishFixClass = Nil;

- (UIView *)hackishlyFoundBrowserView {
    UIScrollView *scrollView = self.scrollView;

    UIView *browserView = nil;
    for (UIView *subview in scrollView.subviews) {
        if ([NSStringFromClass([subview class]) hasPrefix:@"UIWebBrowserView"]) {
            browserView = subview;
            break;
        }
    }
    return browserView;
}

- (id)methodReturningNil {
    return nil;
}

- (void)ensureHackishSubclassExistsOfBrowserViewClass:(Class)browserViewClass {
    if (!hackishFixClass) {
        Class newClass = objc_allocateClassPair(browserViewClass, hackishFixClassName, 0);
        IMP nilImp = [self methodForSelector:@selector(methodReturningNil)];
        class_addMethod(newClass, @selector(inputAccessoryView), nilImp, "@@:");
        objc_registerClassPair(newClass);

        hackishFixClass = newClass;
    }
}

- (BOOL) hackishlyHidesInputAccessoryView {
    UIView *browserView = [self hackishlyFoundBrowserView];
    return [browserView class] == hackishFixClass;
}

- (void) setHackishlyHidesInputAccessoryView:(BOOL)value {
    UIView *browserView = [self hackishlyFoundBrowserView];
    if (browserView == nil) {
        return;
    }
    [self ensureHackishSubclassExistsOfBrowserViewClass:[browserView class]];

    if (value) {
        object_setClass(browserView, hackishFixClass);
    }
    else {
        Class normalClass = objc_getClass("UIWebBrowserView");
        object_setClass(browserView, normalClass);
    }
    [browserView reloadInputViews];
}

@end

這篇關于Phonegap iOS6:刪除表單助手欄的正確解決方案(上一個,下一個,完成)的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Decimal separator comma (#39;,#39;) with numberDecimal inputType in EditText(EditText 中帶有 numberDecimal inputType 的小數分隔符逗號 (,))
Soft keyboard open and close listener in an activity in Android(軟鍵盤在Android中的活動中打開和關閉監(jiān)聽器)
How to draw stars using Quartz Core?(如何使用 Quartz Core 繪制星星?)
Why does giving addArcWithCenter a startAngle of 0 degrees make it start at 90 degrees?(為什么給 addArcWithCenter 一個 0 度的 startAngle 使它從 90 度開始?)
Android Catch Notes App Like Circle Menu(Android Catch Notes 應用程序,如圓形菜單)
No such acos function exists(不存在這樣的 acos 函數)
主站蜘蛛池模板: 日韩中文字幕av | 国产精品久久久久久久一区探花 | 国产免费一区二区三区 | 中文字幕精品视频在线观看 | 美女视频一区二区 | aaa在线观看 | 日本一区二区高清不卡 | 天天操网| 一区二区三区四区毛片 | 草草视频在线免费观看 | 91麻豆精品国产91久久久资源速度 | 国产乱一区二区三区视频 | 亚洲精品在线视频 | 日韩视频在线免费观看 | 亚洲日日 | 亚洲视频中文 | 国产欧美精品在线观看 | 特黄毛片视频 | 性国产xxxx乳高跟 | 免费在线观看av | 欧美中文字幕一区二区 | 亚洲一区二区久久 | 国产乡下妇女做爰 | 五月婷婷激情 | 黄色片在线网站 | 日韩av在线中文字幕 | 午夜一级大片 | 99综合 | 国产精品视频一区二区三区四区国 | 91精品国产一区二区三区香蕉 | 日本高清中文字幕 | www.av在线 | 91成人在线视频 | 国产精品欧美一区二区 | 欧美一级久久 | 成人免费大片黄在线播放 | 国产精品久久久一区二区三区 | 91视视频在线观看入口直接观看 | 国产精品中文字幕一区二区三区 | 久久国产激情视频 | 久久国产精品视频 |