久久久久久久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,但仍然應該有有人以一點優雅和深思熟慮解決了這個問題,或者熟悉 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.

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

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?

推薦答案

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

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.

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

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中的活動中打開和關閉監聽器)
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 函數)
主站蜘蛛池模板: 国产精品久久 | 精品一区二区久久久久久久网站 | 国产精品美女久久久久aⅴ国产馆 | 天天色图 | 国产精品视频免费看 | 免费国产一区 | 国产精品成人一区二区三区夜夜夜 | 国产乱码精品一区二区三区中文 | 午夜三级在线观看 | 久久久久久国产精品 | 国产精品一区二区欧美黑人喷潮水 | 国产成在线观看免费视频 | 在线播放亚洲 | 精品麻豆剧传媒av国产九九九 | 国产婷婷| 成人在线精品视频 | 国产精品成人一区二区三区吃奶 | h在线播放 | 美女视频网站久久 | 高清黄色网址 | 在线一区二区观看 | 一级毛片免费完整视频 | 国产精品久久久久久久久久久久久 | 久久久久黄 | 亚洲国产欧美在线人成 | 中文字字幕一区二区三区四区五区 | 免费天天干 | a级片在线观看 | 亚洲免费人成在线视频观看 | 国产一区二区三区视频免费观看 | 久久精品国产久精国产 | 人人性人人性碰国产 | 91在线视频国产 | www.日日干| 91精品久久久久久久久久 | 国产一区二区视频在线 | 国产一区二区三区 | av男人的天堂在线 | 成人三级视频在线观看 | 2022精品国偷自产免费观看 | 人成在线 |