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 "UICollectionViewFlowLayoutCenterItem.h" | |
| @implementation UICollectionViewFlowLayoutCenterItem | |
| - (CGPoint)targetContentOffsetForProposedContentOffset:(CGPoint)proposedContentOffset withScrollingVelocity:(CGPoint)velocity | |
| { | |
| CGSize collectionViewSize = self.collectionView.bounds.size; | |
| CGFloat proposedContentOffsetCenterX = proposedContentOffset.x + self.collectionView.bounds.size.width * 0.5f; | |
| CGRect proposedRect = self.collectionView.bounds; |
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
| // | |
| // ViewController.m | |
| // AVPlayerCaching | |
| // | |
| // Created by Anurag Mishra on 5/19/14. | |
| // Sample code to demonstrate how to cache a remote audio file while streaming it with AVPlayer | |
| // | |
| #import "ViewController.h" | |
| #import <AVFoundation/AVFoundation.h> |
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
| func colorWithGradient(frame: CGRect, colors: [UIColor]) -> UIColor { | |
| // create the background layer that will hold the gradient | |
| let backgroundGradientLayer = CAGradientLayer() | |
| backgroundGradientLayer.frame = frame | |
| // we create an array of CG colors from out UIColor array | |
| let cgColors = colors.map({$0.CGColor}) | |
| backgroundGradientLayer.colors = cgColors |
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
| #!/bin/bash | |
| # git pre-commit hook that runs an clang-format stylecheck. | |
| # Features: | |
| # - abort commit when commit does not comply with the style guidelines | |
| # - create a patch of the proposed style changes | |
| # modifications for clang-format by [email protected] | |
| # This file is part of a set of unofficial pre-commit hooks available | |
| # at github. |
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 the code path that changed the status bar orientation on iOS 7: | |
| * thread #1: tid = 0x698dbf, 0x00085830 WindowRotationIssue`-[AppDelegate application:willChangeStatusBarOrientation:duration:](self=0x7a041f90, _cmd=0x0137a18d, application=0x79e39cc0, newStatusBarOrientation=UIInterfaceOrientationPortraitUpsideDown, duration=0.80000000000000004) + 96 at AppDelegate.m:23, queue = 'com.apple.main-thread', stop reason = breakpoint 3.1 | |
| * frame #0: 0x00085830 WindowRotationIssue`-[AppDelegate application:willChangeStatusBarOrientation:duration:](self=0x7a041f90, _cmd=0x0137a18d, application=0x79e39cc0, newStatusBarOrientation=UIInterfaceOrientationPortraitUpsideDown, duration=0.80000000000000004) + 96 at AppDelegate.m:23 | |
| frame #1: 0x00bb6ab5 UIKit`-[UIApplication setStatusBarOrientation:animationParameters:notifySpringBoardAndFence:] + 242 | |
| frame #2: 0x00bfa8e4 UIKit`-[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:isRotating:] + 4761 | |
| frame #3: 0x00bf9646 UIKit`-[UIWi |
- Introduction to Functional Programming Johannes Weiß - https://vimeo.com/100786088
- ReactiveCocoa at MobiDevDay Andrew Sardone - https://vimeo.com/65637501
- The Future Of ReactiveCocoa Justin Spahr-Summers - https://www.youtube.com/watch?v=ICNjRS2X8WM
- Enemy of the State Justin Spahr-Summers - https://www.youtube.com/watch?v=7AqXBuJOJkY
- WWDC 2014 Session 229 - Advanced iOS Application Architecture and Patterns Andy Matuschak - https://developer.apple.com/videos/play/wwdc2014/229/
- Functioning as a Functionalist Andy Matuschak - https://www.youtube.com/watch?v=rJosPrqBqrA
- Controlling Complexity in Swift Andy Matuschak - https://realm.io/news/andy-matuschak-controlling-complexity/
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <Bucket | |
| type = "2" | |
| version = "2.0"> | |
| <Breakpoints> | |
| <!-- All Exceptions --> | |
| <BreakpointProxy | |
| BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint"> | |
| <BreakpointContent |
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> | |
| #import "RCTBridgeModule.h" | |
| #define RCT_EXTERN_MODULE(objc_name, objc_supername) \ | |
| RCT_EXTERN_REMAP_MODULE(objc_name, objc_name, objc_supername) | |
| #define RCT_EXTERN_REMAP_MODULE(js_name, objc_name, objc_supername) \ | |
| objc_name : objc_supername \ | |
| @end \ | |
| @interface objc_name (RCTExternModule) <RCTBridgeModule> \ |
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
| var a = ["sdfdf", "http://oooooolol"], | |
| handleNetErr = function(e) { return e }; | |
| Promise.all(fetch('sdfdsf').catch(handleNetErr), fetch('http://invalidurl').catch(handleNetErr)) | |
| .then(function(sdf, invalid) { | |
| console.log(sdf, invalid) // [Response, TypeError] | |
| }) | |
| .catch(function(err) { | |
| console.log(err); | |
| }) |

