Skip to content

Instantly share code, notes, and snippets.

View romaonthego's full-sized avatar

Roman Efimov romaonthego

View GitHub Profile
@interface UIWindow (resize)
-(void)_adjustSizeClassesAndResizeWindowToFrame:(CGRect)frame;
@end
typedef enum _UICustomRes
{
UICustomResiPadTwoThirds,
UICustomResiPadHalf,
UICustomResiPadOneThird,
UICustomResiPhone47,
@mikeash
mikeash / test.m
Created July 9, 2012 21:15
Cocoa array slicing
// clang -framework Foundation -fobjc-arc -O3 test.m
#import <Foundation/Foundation.h>
@interface Slice : NSObject
@property NSInteger start;
@property NSInteger length;
@end
@implementation Slice
@chriseidhof
chriseidhof / :(
Created November 4, 2014 10:41 — forked from kostiakoval/:(
import Foundation
import ImageIO
infix operator >>= { associativity left }
func >>=<A,B>(l: A?, r: A -> B?) -> B? {
if let x = l {
return r(x)
}
return nil
//
// UIApplication+UDCStatusView.m
// Udacity
//
// Created by Oliver Cameron on 12/5/13.
// Copyright (c) 2013 Udacity. All rights reserved.
//
#import "UIApplication+UDCStatusView.h"