Skip to content

Instantly share code, notes, and snippets.

View chrissingh's full-sized avatar
🎯
Focusing

Christopher Singh chrissingh

🎯
Focusing
View GitHub Profile
@chrissingh
chrissingh / UINavigationController+Fade.h
Created June 2, 2016 03:38 — forked from ksm/UINavigationController+Fade.h
UINavigationController custom pop/push transition animation
/*
Copied and pasted from David Hamrick's blog:
Source: http://www.davidhamrick.com/2011/12/31/Changing-the-UINavigationController-animation-style.html
*/
@interface UINavigationController (Fade)
- (void)pushFadeViewController:(UIViewController *)viewController;
- (void)fadePopViewController;
@chrissingh
chrissingh / UINavigationControllerFade.h
Created June 2, 2016 03:35 — forked from hamrickdavid/UINavigationControllerFade.h
Changing the UINavigationController animation style
@interface UINavigationController (Fade)
- (void)pushFadeViewController:(UIViewController *)viewController;
- (void)fadePopViewController;
@end
@chrissingh
chrissingh / scale.cs
Created May 29, 2016 18:50 — forked from nicwise/scale.cs
Scale and Rotate an image in iOS / MonoTouch, using the EXIF data
public static UIImage ScaleImage(UIImage image, int maxSize)
{
UIImage res;
using (CGImage imageRef = image.CGImage)
{
CGImageAlphaInfo alphaInfo = imageRef.AlphaInfo;
CGColorSpace colorSpaceInfo = CGColorSpace.CreateDeviceRGB();
if (alphaInfo == CGImageAlphaInfo.None)
@chrissingh
chrissingh / universal-framework.sh
Created May 28, 2016 18:29 — forked from Tokuriku/universal-framework.sh
Script to put in an Aggregate Target of a Framework in Xcode 6 to create a Universal Framework
#!/bin/sh
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal
# make sure the output directory exists
mkdir -p "${UNIVERSAL_OUTPUTFOLDER}"
# Step 1. Build Device and Simulator versions
xcodebuild -target "${PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build
xcodebuild -target "${PROJECT_NAME}" -configuration ${CONFIGURATION} -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build
@chrissingh
chrissingh / EffectsController.cs
Last active August 29, 2015 14:27 — forked from mikebluestein/EffectsController.cs
iOS 8 Visual Effects using Xamarin
using System;
using System.Drawing;
using MonoTouch.UIKit;
namespace ViewEffectsDemo
{
public class EffectsController : UIViewController
{
UIImageView imageView;
UIScrollView scrollView;
@chrissingh
chrissingh / AssemblyInfo.cs
Last active August 29, 2015 14:27 — forked from redent/AssemblyInfo.cs
MLPAutoCompleteTextField Xamarin binding adapted for Unified API and 64 bit platforms
using System;
using ObjCRuntime;
[assembly: LinkWith ("libMLPAutoCompleteTextFieldSDK.a", LinkTarget.Simulator | LinkTarget.ArmV7 | LinkTarget.ArmV7s | LinkTarget.Arm64, Frameworks = "CoreGraphics", ForceLoad = true)]