Skip to content

Instantly share code, notes, and snippets.

View nicoverbruggen's full-sized avatar

Nico Verbruggen nicoverbruggen

View GitHub Profile
@nicoverbruggen
nicoverbruggen / main.css
Created March 12, 2014 12:35
Features you can use in CSS for Cordova builds (webkit)
/* The following optimizations can make your app feel more native. */
.element{
/* Disable selection/copy of UIWebView.
If you tap and hold, you can usually copy content fron a webview.
-webkit-user-select: none disables this functionality for a specific element. */
-webkit-user-select: none;
/* Disable the iOS popup when long-press on a link. (a-element, button, etc)
@nicoverbruggen
nicoverbruggen / CDVCommandQueue.m
Last active August 29, 2015 13:57
Cordova iOS 7.0/7.1 optimizations. Also fixes for 7.1 arm64 crashes in plugins in CordovaLib < 3.5. Also includes fix for no splash screen on iPhone with 3.5" screen.
// Fix for BAD_ACCESS on arm64 devices
// Per this diff: https://git-wip-us.apache.org/repos/asf?p=cordova-ios.git;a=blobdiff;f=CordovaLib/Classes/CDVCommandQueue.m;h=1eddfe37ee699289701cd4caaf68486607010501;hp=902dfa0227f1358296d2218fa0e6d5cc2a882ea6;hb=82ce4f2;hpb=7da5f2df3417de68a1b540bc00c11a95ce3dc7d6
// Should be fixed in CordovaLib 3.5
SEL normalSelector = NSSelectorFromString(methodName);
if ([obj respondsToSelector:normalSelector]) {
// [obj performSelector:normalSelector withObject:command];
((void (*)(id, SEL, id))objc_msgSend)(obj, normalSelector, command); // replace the old line with this one
} else {
// There's no method to call, so throw an error.