Skip to content

Instantly share code, notes, and snippets.

Project # of Top 100 Free Apps (US)
facebook-ios-sdk 67
Bolts-iOS 48
AFNetworking 39
Google-Mobile-Ads-SDK 38
Reachability (Apple) 38
Crashlytics 37
Flurry-iOS-SDK 31
CocoaPods 30
GoogleConversionTracking 29
@5sw
5sw / View.m
Last active February 16, 2018 03:35
UIView subclass that renders a SceneKit scene using SCNRenderer
#import <UIKit/UIKit.h>
#import <SceneKit/SceneKit.h>
#import <OpenGLES/ES2/gl.h>
#import <OpenGLES/ES2/glext.h>
@interface View : UIView
@property (strong, nonatomic) SCNScene *scene;
- (void)renderFrame;
@staltz
staltz / introrx.md
Last active July 6, 2024 17:07
The introduction to Reactive Programming you've been missing
@jianpx
jianpx / wwdc2014-videos-and-pdf
Created June 7, 2014 13:42
wwdc 2014 videos and pdf download links, including HD/SD version.
http://devstreaming.apple.com/videos/wwdc/2014/403xxksrj0qs8c0/403/403_hd_intermediate_swift.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/403xxksrj0qs8c0/403/403_sd_intermediate_swift.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/403xxksrj0qs8c0/403/403_intermediate_swift.pdf?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/419xxli6f60a6bs/419/419_hd_advanced_graphics_and_animation_performance.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/419xxli6f60a6bs/419/419_sd_advanced_graphics_and_animation_performance.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/419xxli6f60a6bs/419/419_advanced_graphics_and_animation_performance.pdf?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/101xx36lr6smzjo/101/101_hd.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/101xx36lr6smzjo/101/101_sd.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/236xxwk3fv82sx2/236/236_hd_building_interruptible_and_responsive_interactions.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2
@watr
watr / UIImage+BezierPath.h
Created April 23, 2014 01:07
Convenient category to create UIImage from UIBezierPath
#import <UIKit/UIKit.h>
@interface UIImage (BezierPath)
+ (UIImage *)imageWithBezierPathFill:(UIBezierPath *)bezierPath;
+ (UIImage *)imageWithBezierPathStroke:(UIBezierPath *)bezierPath;
@end
@steipete
steipete / Macros.h
Last active January 6, 2024 07:24
Declare on your main init that all other init methods should call. It's a nice additional semantic warning. Works with Xcode 5.1 and above. Not tested with earlier variants, but should just be ignored. A reference to this macro shortly appeared in https://developer.apple.com/library/ios/releasenotes/ObjectiveC/ModernizationObjC/AdoptingModernObj…
#ifndef NS_DESIGNATED_INITIALIZER
#if __has_attribute(objc_designated_initializer)
#define NS_DESIGNATED_INITIALIZER __attribute((objc_designated_initializer))
#else
#define NS_DESIGNATED_INITIALIZER
#endif
#endif
@raven
raven / Breakpoints_v2.xcbkptlist
Last active August 30, 2019 00:53
Symbolic breakpoint for dynamically linking libReveal against UIApplicationMain
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "2"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.SymbolicBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
@sgtsquiggs
sgtsquiggs / UIColor+iOS7NavigationBar_Expanded.m
Last active December 26, 2015 20:09
Equivalent color w/ alpha for UINavigationBar's barTintColor
@implementation UIColor (iOS7NavigationBar_Expanded)
// Returns equivelent color with alpha nearest to minimum alpha
- (UIColor *) equivalentNonOpaqueColorWhenInterpolatedWithBackgroundColor: (UIColor *)backgroundColor minimumAlpha: (CGFloat) alpha
{
NSAssert(self.canProvideRGBComponents, @"Self must be a RGB color to use arithmatic operations");
NSAssert(backgroundColor.canProvideRGBComponents, @"Self must be a RGB color to use arithmatic operations");
NSAssert(self.alpha == 1, @"Self must be an opaque RGB color");
NSAssert(backgroundColor.alpha == 1, @"Background color must be an opaque RGB color");
CGFloat r, g, b, a;
@zhugexiaobo
zhugexiaobo / updateRepo.sh
Created August 29, 2013 10:30
批量 git pull 仓库最新代码
#!/bin/sh
for dir in $(ls -d */)
do
if [ -d "$dir"/.git ]; then
echo "$dir" && cd "$dir" && git pull && cd ..
fi
done
#!/bin/sh
#
# Adam Sharp
# Aug 21, 2013
#
# Usage: Add it to your PATH and `git remove-submodule path/to/submodule`.
#
# Does the inverse of `git submodule add`:
# 1) `deinit` the submodule
# 2) Remove the submodule from the index and working directory