defaults write
and relaunch your apps.
% defaults write -g ApplePressAndHoldEnabled -bool false
static void *tempCopyOf(void *data,UInt32 size) { void *buffer = NULL; if (data) { buffer = malloc(size); if (buffer) { bcopy(data,buffer,size); [NSData dataWithBytesNoCopy: buffer length: size freeWhenDone: YES]; } } return (buffer); }You can get really fancy and assign
buffer
to calloc(1, size)
if you want to give it "pass NULL to get a zero-filled buffer back" semantics.
Also note this doesn't play well with garbage collection - caveat nerdor. (Thanks to Ken Ferry for that note)
poseAsClass:
to hook yourself into the matrix during the +load
method:
@interface BorkSpellChecker : NSSpellChecker { } @end // BorkSpellChecker @implementation BorkSpellChecker + (void) load { NSLog (@"posing"); [self poseAsClass: [NSSpellChecker class]]; } // load - (void) ignoreWord: (NSString *) word inSpellDocumentWithTag: (int) tag { NSLog (@"ignore word: %@ intag: %d", word, tag); [super ignoreWord: word inSpellDocumentWithTag: tag]; } // ignoreWord
The UIApplication itemTimerDisabled
controls whether the screen should dim. Disable it by enabling it:
[[UIApplication sharedApplication] setIdleTimerDisabled: YES];or equivalently
[UIApplication sharedApplication].idleTimerDisabled = YES;
Unfortunately, this is not a reliable operation. Sometimes twiddling a UI control or playing music will let the screen dim and lock up. What I ended up doing is toggling the value in a timer:
[[UIApplication sharedApplication] setIdleTimerDisabled: NO]; [[UIApplication sharedApplication] setIdleTimerDisabled: YES];
Open up Internet Connect, select your VPN icon in the toolbar, and choose options from the Connect menu. Uncheck "Disconnect when switching user accounts".
UIFileSharingEnabled LSSupportsOpeningDocumentsInPlace