This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import <Foundation/Foundation.h> | |
| @interface NSObject (IsNull) | |
| - (BOOL)isNull; | |
| - (BOOL)isNotNull; | |
| @end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @interface | |
| + (BOOL)compareStringA:(NSString *)A andB:(NSString *)B; | |
| @end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| + (UIImage *)something:(COProductCollectionViewCell *)view { | |
| static EAGLContext *myEAGLContext; | |
| static NSDictionary *options; | |
| static CIContext *myContext; | |
| static dispatch_once_t onceToken; | |
| dispatch_once(&onceToken, ^{ | |
| myEAGLContext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2]; | |
| options = @{ kCIContextWorkingColorSpace : [NSNull null] }; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - (CATransform3D)perspectiveTransformForProgress:(CGFloat)progress { | |
| CATransform3D rotationAndPerspectiveTransform = CATransform3DIdentity; | |
| rotationAndPerspectiveTransform = CATransform3DTranslate(rotationAndPerspectiveTransform, progress * [self menuWidth], 0.0f, 0.0f); | |
| float scale = 1.0f - ((1.0f - kPerspectiveScale) * progress); | |
| rotationAndPerspectiveTransform = CATransform3DScale(rotationAndPerspectiveTransform, scale, scale, 1.0f); | |
| rotationAndPerspectiveTransform.m34 = (1.0f * kPerspectiveDistortionStrength) / -1000.0f; | |
| rotationAndPerspectiveTransform = CATransform3DRotate(rotationAndPerspectiveTransform, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| post_install do |installer_representation| | |
| installer_representation.project.targets.each do |target| | |
| target.build_configurations.each do |config| | |
| config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO' | |
| end | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extension UIView { | |
| func animateConstraints(animation:(()->())? = nil, completion:(()->())? = nil) { | |
| setNeedsUpdateConstraints() | |
| UIView.animateWithDuration(0.3, | |
| animations: { | |
| animation?() | |
| self.layoutIfNeeded() | |
| }) { _ in | |
| completion?() | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @implementation IntegrationTestUtils | |
| + (TyphoonComponentFactory*)testAssembly | |
| { | |
| TyphoonComponentFactory* factory = [[TyphoonBlockComponentFactory alloc] initWithAssemblies:@[ | |
| [MyAppAssembly assembly], | |
| [MyAppKernel assembly], | |
| [MyAppNetworkComponents assembly], | |
| [MyAppPersistenceComponents assembly] | |
| ]]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import UIKit | |
| @objc protocol CustomDatePickerSourceDelegate:NSObjectProtocol { | |
| func datePickerDidSelectDate(date:NSDate) | |
| } | |
| @objc class CustomDatePickerSource: NSObject { | |
| enum Component:Int { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| extension NSDateFormatter { | |
| private static var cache:[String:NSDateFormatter] = [:] | |
| static func dateFormatterForKey(key:String, initialize:((NSDateFormatter)->())? = nil) -> NSDateFormatter { | |
| if let formatter = NSDateFormatter.cache[key] { | |
| return formatter | |
| } else { | |
| let formatter = NSDateFormatter() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extension NSNumberFormatter { | |
| private static var cache:[String:NSNumberFormatter] = [:] | |
| static func numberFormatterForKey(key:String, initialize:((NSNumberFormatter)->())? = nil) -> NSNumberFormatter { | |
| if let formatter = NSNumberFormatter.cache[key] { | |
| return formatter | |
| } else { | |
| let formatter = NSNumberFormatter() | |
| NSNumberFormatter.cache[key] = formatter | |
| initialize?(formatter) |
OlderNewer