Skip to content

Instantly share code, notes, and snippets.

@ericallam
ericallam / RotateKeynoteDocumentDroplet
Created July 31, 2014 11:12
Rotate Keynote Document for use as an app Prototype
// Open Script Editor and Export this as an Application
//
// Then drop a keynote file on it in the Finder and it will properly resize
// and rotate everything so the Keynote file becomes usable as a prototype
// in the iPhone keynote app
// rotateDocument exported function
//
// Accepts a Keynote document and will rotate
// all the slides and elements in the slide 90 degrees
@ericallam
ericallam / AppDelegate.m
Created May 22, 2014 14:49
Interactive Animated Transition Example
//
// AppDelegate.m
// AnimationExamplesiPhone
//
// Created by Eric Allam on 10/05/2014.
#import "AppDelegate.h"
#pragma mark - UIColor Additions
@ericallam
ericallam / gist:11214298
Created April 23, 2014 12:58
Fixing animation snapback without setDisableActions:YES
// Implements the solution for solving "snapback" found in
// Chapter 8 of "iOS Core Animation Advanced Techniques" by Nick Lockwood
// without the need to use setDisableActions: to override the implicit animation,
// instead passing in the implicit animation key in addAnimation:forKey:
// With setDisableActions
- (void)applyBasicAnimation:(CABasicAnimation *)animation toLayer:(CALayer *)layer
{
//set the from value (using presentation layer if available)
animation.fromValue = [layer.presentationLayer ?: layer valueForKeyPath:animation.keyPath];
#pragma message("Use new block-based API once rdar://15641270 has been fixed")
UI- and App Frameworks Evangelist - Jake Behrens, behrens@apple.com, twitter: @Behrens
- What's new in Cocoa
- Accessibility in iOS
- Building User Interfaces for iOS 7
- Getting Started with UIKit Dynamics
- What's new in Cocoa Touch
- What's New With Multitasking
- Best Practices for Cocoa Animation
- Improving Power Efficiency with App Nap
- Introducing Text Kit
syscall::open*:entry
/execname == "locationd"/
{
printf("locationd open %s\n", copyinstr(arg0));
}
@ericallam
ericallam / CLLocationManager+MockingLocation.h
Created June 1, 2013 03:57
Mocking out CLLocationManager
#import <CoreLocation/CoreLocation.h>
extern CLLocationDegrees kMockedLatitude;
extern CLLocationDegrees kMockedLongitude;
@interface CLLocationManager (MockingLocation)
+ (BOOL)custom_locationServicesEnabled;
+ (CLAuthorizationStatus)custom_authorizationStatus;
-(void)custom_startUpdatingLocation;
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
@ericallam
ericallam / example.sass
Created December 14, 2012 21:22
Sass mode for CodeMirror 3 (WIP)
// This is a comment
/* This comment is
* several lines long.
* since it uses the CSS comment syntax,
* it will appear in the CSS output. */
@import "foo.scss"
@import "foo.css"
AutomationBugRepro2 $ xcodebuild -sdk iphonesimulator6.0 clean build CONFIGURATION_BUILD_DIR=/tmp/AutomationBugRepro
Build settings from command line:
CONFIGURATION_BUILD_DIR = /tmp/AutomationBugRepro
SDKROOT = iphonesimulator6.0
=== CLEAN NATIVE TARGET AutomationBugRepro2 OF PROJECT AutomationBugRepro2 WITH THE DEFAULT CONFIGURATION (Release) ===
Check dependencies
Clean.Remove clean /var/folders/s0/gdl8b96x58z1yyfdq9nw52n80000gn/C/com.apple.Xcode.501/SharedPrecompiledHeaders/AutomationBugRepro2-Prefix-eixjzcivjkzfznebbbrrtbciywri/AutomationBugRepro2-Prefix.pch.pth
builtin-rm -rf /var/folders/s0/gdl8b96x58z1yyfdq9nw52n80000gn/C/com.apple.Xcode.501/SharedPrecompiledHeaders/AutomationBugRepro2-Prefix-eixjzcivjkzfznebbbrrtbciywri/AutomationBugRepro2-Prefix.pch.pth