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 NSObject () | |
| - (void)generateSpringPropertiesForDuration:(float)arg1 damping:(float)arg2 velocity:(float)arg3; | |
| - (id)_defaultAnimationForKey:(id)arg1; | |
| @end | |
| // This object calculates the damping and stiffness coefficients, given a damping value (0...1], a velocity, and a duration. | |
| id obj = [[NSClassFromString(@"UIViewSpringAnimationState") alloc] init]; | |
| [obj generateSpringPropertiesForDuration:10 damping:0.5 velocity:10]; |
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
| t d v damping stiffness | |
| 0.010000 0.100000 -100.000000 2.303480 7.000000 | |
| 0.010000 0.100000 -99.000000 2.301880 7.000000 | |
| 0.010000 0.100000 -98.000000 2.300280 7.000000 | |
| 0.010000 0.100000 -97.000000 2.298670 7.000000 | |
| 0.010000 0.100000 -96.000000 2.297060 7.000000 | |
| 0.010000 0.100000 -95.000000 2.295450 7.000000 | |
| 0.010000 0.100000 -94.000000 2.293840 7.000000 | |
| 0.010000 0.100000 -93.000000 2.292220 7.000000 | |
| 0.010000 0.100000 -92.000000 2.290600 7.000000 |
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
| // NSManagedObjectContext+DebugSwizzling.h | |
| #import <CoreData/CoreData.h> | |
| #if DEBUG | |
| /** | |
| * Toggles debugging of Core Data managed object contexts. | |
| * | |
| * When enabled, will fire NSLogs in the following cases: |
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
| // One-off random number with seed. | |
| srand48(seedObject.hash); | |
| lrand48() |
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
| /* | |
| Copyright (c) 2011-present, NimbusKit. All rights reserved. | |
| This source code is licensed under the BSD-style license found at http://nimbuskit.info/license | |
| */ | |
| // This is ported from NimbusKit 2.0's Delegates-and-Datasources (DaDS) feature, which | |
| // is based upon https://github.com/jverkoey/nimbus/blob/master/src/models/src/NITableViewModel.m | |
| protocol ModelObjectInterface { |
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
| /* | |
| Copyright (c) 2011-present, NimbusKit. All rights reserved. | |
| This source code is licensed under the BSD-style license found at http://nimbuskit.info/license | |
| Extracted from NimbusKit: Swift Edition at https://github.com/nimbuskit/swift | |
| */ | |
| extension NSNotificationCenter { | |
| /** |
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
| This is free and unencumbered software released into the public domain. | |
| Anyone is free to copy, modify, publish, use, compile, sell, or | |
| distribute this software, either in source code form or as a compiled | |
| binary, for any purpose, commercial or non-commercial, and by any | |
| means. | |
| In jurisdictions that recognize copyright laws, the author or authors | |
| of this software dedicate any and all copyright interest in the | |
| software to the public domain. We make this dedication for the benefit |
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
| CGVector NIVectorMakeWithPoints(CGPoint fromPoint, CGPoint toPoint); | |
| CGVector NIVectorMakeWithPoint(CGPoint point); | |
| CGPoint NIPointMakeWithVector(CGVector vector); | |
| NSString* NIStringFromVector(CGVector vector); | |
| CGFloat NIVectorLength(CGVector vector); | |
| CGFloat NIRadiansFromReferenceVectorToVector(CGVector vector); | |
| CGFloat NIVectorDotProduct(CGVector vector1, CGVector vector2); | |
| extern const CGVector NIReferenceVector; |
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
| // Radar: http://openradar.appspot.com/radar?id=6067475636551680 | |
| @interface View : UIView | |
| @end | |
| @implementation View | |
| - (void)drawRect:(CGRect)rect { | |
| [super drawRect:rect]; | |
| } |
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
| // As seen here http://www.freelancemadscience.com/fmslabs_blog/2012/9/18/advanced-profiling-with-the-dtperformancesession-framework.html | |
| // and here: http://stackoverflow.com/questions/20269630/xcode-instruments-trace-comparison | |
| // This was sadly broken in iOS 7 and flags no longer show up in Instruments. Any ideas? | |
| #define DT_KEY_USERID "DT_KEY_USERID" | |
| #define DT_KEY_SOURCE "DT_KEY_SOURCE" | |
| #define DT_KEY_BACKTRACE "DT_KEY_BACKTRACE" | |
| #define DT_KEY_TIMESEC "DT_KEY_TIMESEC" | |
| #define DT_KEY_TIMENSEC "DT_KEY_TIMENSEC" |