uikonf '14
-
- 10:10am
- Christopher Downer: Designing Custom Interfaces
- Katrin Apel: Mobile Backends as a Service - Ready for Production?
-
- 12pm
| // | |
| // UIView+Positioning.swift | |
| // | |
| import UIKit | |
| extension UIView { | |
| var frameOrigin: CGPoint { | |
| get { frame.origin } | |
| set(origin) { frame = CGRectMake(origin.x, origin.y, frame.size.width, frame.size.height) } |
| - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { | |
| [super touchesBegan:touches withEvent:event]; | |
| UIView *button = [self viewForTouches:touches event:event]; | |
| [self setHighlightedView:button]; | |
| } | |
| - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { | |
| [super touchesMoved:touches withEvent:event]; |
| /** | |
| * JSONCoding plugin for remodel. | |
| * It generates two additional methods, which convert the object to/from a JSON dictionary: | |
| * - initWithJSONDictionary initializer | |
| * - toJSONDictionary instance method | |
| * | |
| * Add includes<JSONCoding> to your .value file to use. | |
| * | |
| */ |
uikonf '14
| typedef void (*BLASParamErrorProc)(const char *funcName, const char *paramName, | |
| typedef float __M128 __attribute__((vector_size (16))); | |
| typedef __M128 VectorFloat; | |
| typedef VectorFloat ConstVectorFloat; | |
| typedef int __CLPK_integer; | |
| typedef int __CLPK_logical; | |
| typedef float __CLPK_real; | |
| typedef double __CLPK_doublereal; | |
| typedef __CLPK_logical (*__CLPK_L_fp)(); | |
| typedef int __CLPK_ftnlen; |
| import os, sys, glob | |
| # logging methods | |
| def printRed(msg): | |
| print "\x1B[" + "31;40m" + msg + "\x1B[0m" | |
| def printGreen(msg): | |
| print "\x1B[" + "32;40m" + msg + "\x1B[0m" | |
| # check for argument | |
| if len(sys.argv) <= 1 : |
| #import "UIView+DTDebug.h" | |
| #import "NSObject+DTRuntime.h" | |
| @implementation UIView (DTDebug) | |
| - (void)methodCalledNotFromMainQueue:(NSString *)methodName | |
| { | |
| NSLog(@"-[%@ %@] being called on background queue. Break on -[UIView methodCalledNotFromMainQueue:] to find out where", NSStringFromClass([self class]), methodName); | |
| } | |
| - (void)registerForNotifications | |
| { | |
| [[NSNotificationCenter defaultCenter] addObserver:self | |
| selector:@selector(keyboardStateChanged:) | |
| name:UIKeyboardDidShowNotification | |
| object:nil]; | |
| [[NSNotificationCenter defaultCenter] addObserver:self | |
| selector:@selector(keyboardStateChanged:) | |
| name:UIKeyboardWillHideNotification | |
| object:nil]; |
| @implementation UIImage (NoCaching) | |
| + (UIImage*) make: (NSString*) filePath | |
| { | |
| NSString* file = [[NSBundle mainBundle] pathForResource: [filePath lastPathComponent] ofType: nil | |
| inDirectory: [filePath stringByDeletingLastPathComponent]]; | |
| return [self imageWithContentsOfFile: file]; | |
| } | |
| @end |
| // | |
| // NSContainer+Subscripting.h | |
| // | |
| // Created by Markus Emrich on 10.08.12. | |
| // Copyright 2012 nxtbgthng. All rights reserved. | |
| // | |
| #if !defined(__IPHONE_6_0) || __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_6_0 | |
| #import "NSContainer+Subscripting.h" |