diff options
Diffstat (limited to 'plugins/cordova-plugin-ios-longpress-fix')
| -rw-r--r-- | plugins/cordova-plugin-ios-longpress-fix/LICENSE | 21 | ||||
| -rw-r--r-- | plugins/cordova-plugin-ios-longpress-fix/README.md | 37 | ||||
| -rw-r--r-- | plugins/cordova-plugin-ios-longpress-fix/package.json | 37 | ||||
| -rwxr-xr-x | plugins/cordova-plugin-ios-longpress-fix/plugin.xml | 38 | ||||
| -rw-r--r-- | plugins/cordova-plugin-ios-longpress-fix/screenshots/magnifying-glass.png | bin | 67841 -> 0 bytes | |||
| -rwxr-xr-x | plugins/cordova-plugin-ios-longpress-fix/src/ios/LongPressFix.h | 7 | ||||
| -rwxr-xr-x | plugins/cordova-plugin-ios-longpress-fix/src/ios/LongPressFix.m | 35 |
7 files changed, 0 insertions, 175 deletions
diff --git a/plugins/cordova-plugin-ios-longpress-fix/LICENSE b/plugins/cordova-plugin-ios-longpress-fix/LICENSE deleted file mode 100644 index 02389508..00000000 --- a/plugins/cordova-plugin-ios-longpress-fix/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Telerik - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE.
\ No newline at end of file diff --git a/plugins/cordova-plugin-ios-longpress-fix/README.md b/plugins/cordova-plugin-ios-longpress-fix/README.md deleted file mode 100644 index 77f620a8..00000000 --- a/plugins/cordova-plugin-ios-longpress-fix/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# Cordova iOS LongPress Fix Plugin -by [Eddy Verbruggen](http://twitter.com/eddyverbruggen) - - -## Description - -Apple thought it'd be nice to show a magnifying glass when longpressing the webview on iOS9. - -Don't like it? This plugin removes it! - -<img src="screenshots/magnifying-glass.png" width="375px" height="333px"/> - - -## Installation - -Cordova CLI -``` -$ cordova plugin add cordova-plugin-ios-longpress-fix -``` - -PhoneGap Build -```xml -<gap:plugin id="cordova-plugin-ios-longpress-fix" source="npm" /> -``` - - -## Usage -It just works, and will proudly shout that at the XCode console when it does. - - -## Limitations -Currently only works with UIWebView, not WKWebView, but you should be able to -suppress the magnifying glass on WKWebView with a few lines of CSS. - - -## Future -I'm working with Cordova guys to get this in their distribution as standard.
\ No newline at end of file diff --git a/plugins/cordova-plugin-ios-longpress-fix/package.json b/plugins/cordova-plugin-ios-longpress-fix/package.json deleted file mode 100644 index 085c61f9..00000000 --- a/plugins/cordova-plugin-ios-longpress-fix/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "cordova-plugin-ios-longpress-fix", - "version": "1.0.1", - "description": "Suppresses the silly magnifying glass when longpressing your app on iOS9", - "cordova": { - "id": "cordova-plugin-ios-longpress-fix", - "platforms": [ - "ios" - ] - }, - "repository": { - "type": "git", - "url": "git+https://github.com/EddyVerbruggen/cordova-plugin-ios-longpress-fix.git" - }, - "keywords": [ - "LongPress", - "LongTap", - "Zoom", - "Magnification", - "Magnifying glass", - "iOS9", - "ecosystem:cordova", - "cordova-ios" - ], - "engines": [ - { - "name": "cordova", - "version": ">=3.0.0" - } - ], - "author": "Eddy Verbruggen <eddyverbruggen@gmail.com> (https://github.com/EddyVerbruggen)", - "license": "MIT", - "bugs": { - "url": "https://github.com/EddyVerbruggen/cordova-plugin-ios-longpress-fix/issues" - }, - "homepage": "https://github.com/EddyVerbruggen/cordova-plugin-ios-longpress-fix#readme" -}
\ No newline at end of file diff --git a/plugins/cordova-plugin-ios-longpress-fix/plugin.xml b/plugins/cordova-plugin-ios-longpress-fix/plugin.xml deleted file mode 100755 index 228eec60..00000000 --- a/plugins/cordova-plugin-ios-longpress-fix/plugin.xml +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" - id="cordova-plugin-ios-longpress-fix" - version="1.0.1"> - - <name>iOS LongPress Fix</name> - - <description> - Suppresses the silly magnifying glass when longpressing your app on iOS9 - </description> - - <author>Eddy Verbruggen</author> - - <license>MIT</license> - - <keywords>LongPress, LongTap, Zoom, Magnification, Magnifying glass, iOS9</keywords> - - <repo>https://github.com/EddyVerbruggen/cordova-plugin-ios-longpress-fix.git</repo> - - <issue>https://github.com/EddyVerbruggen/cordova-plugin-ios-longpress-fix/issues</issue> - - <engines> - <engine name="cordova" version=">=3.0.0"/> - </engines> - - <platform name="ios"> - <config-file target="config.xml" parent="/*"> - <feature name="LongPressFix"> - <param name="ios-package" value="LongPressFix"/> - <param name="onload" value="true"/> - </feature> - </config-file> - - <header-file src="src/ios/LongPressFix.h"/> - <source-file src="src/ios/LongPressFix.m"/> - </platform> - -</plugin> diff --git a/plugins/cordova-plugin-ios-longpress-fix/screenshots/magnifying-glass.png b/plugins/cordova-plugin-ios-longpress-fix/screenshots/magnifying-glass.png Binary files differdeleted file mode 100644 index 5ab7c70e..00000000 --- a/plugins/cordova-plugin-ios-longpress-fix/screenshots/magnifying-glass.png +++ /dev/null diff --git a/plugins/cordova-plugin-ios-longpress-fix/src/ios/LongPressFix.h b/plugins/cordova-plugin-ios-longpress-fix/src/ios/LongPressFix.h deleted file mode 100755 index 132bb8ad..00000000 --- a/plugins/cordova-plugin-ios-longpress-fix/src/ios/LongPressFix.h +++ /dev/null @@ -1,7 +0,0 @@ -#import <Cordova/CDVPlugin.h> - -@interface LongPressFix : CDVPlugin - -@property (nonatomic,strong) UILongPressGestureRecognizer *lpgr; - -@end
\ No newline at end of file diff --git a/plugins/cordova-plugin-ios-longpress-fix/src/ios/LongPressFix.m b/plugins/cordova-plugin-ios-longpress-fix/src/ios/LongPressFix.m deleted file mode 100755 index 9f3d8521..00000000 --- a/plugins/cordova-plugin-ios-longpress-fix/src/ios/LongPressFix.m +++ /dev/null @@ -1,35 +0,0 @@ -#import "LongPressFix.h" - -@implementation LongPressFix - -- (void)pluginInitialize { - self.lpgr = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(handleLongPressGestures:)]; - self.lpgr.minimumPressDuration = 0.45f; - self.lpgr.allowableMovement = 100.0f; - - NSArray *views = self.webView.subviews; - if (views.count == 0) { - NSLog(@"No webview subviews found, not applying the longpress fix"); - return; - } - for (int i=0; i<views.count; i++) { - UIView *webViewScrollView = views[i]; - if ([webViewScrollView isKindOfClass:[UIScrollView class]]) { - NSArray *webViewScrollViewSubViews = webViewScrollView.subviews; - UIView *browser = webViewScrollViewSubViews[0]; - [browser addGestureRecognizer:self.lpgr]; - NSLog(@"Applied longpress fix"); - break; - } - } -} - -- (void)handleLongPressGestures:(UILongPressGestureRecognizer *)sender { - if ([sender isEqual:self.lpgr]) { - if (sender.state == UIGestureRecognizerStateBegan) { - NSLog(@"Ignoring a longpress in order to suppress the magnifying glass (iOS9 quirk)"); - } - } -} - -@end
\ No newline at end of file |
