This file contains 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
#define SYNTHESIZE_SINGLETON_FOR_CLASS_WITH_CUSTOM_METHOD_NAME(classname, methodname) \ | |
\ | |
static classname *shared##classname = nil; \ | |
\ | |
+ (classname *)methodname \ | |
{ \ | |
@synchronized(self) \ | |
{ \ | |
if (shared##classname == nil) \ | |
{ \ |
This file contains 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 java.util.HashMap; | |
import android.content.Context; | |
import android.os.Bundle; | |
import android.support.v4.app.Fragment; | |
import android.support.v4.app.FragmentActivity; | |
import android.support.v4.app.FragmentTransaction; | |
import android.view.View; | |
import android.widget.TabHost; | |
import android.widget.TabHost.OnTabChangeListener; |
This file contains 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 "AVPlayer+MOAdditions.h" | |
#include <CoreMedia/CMBase.h> | |
#import "AVPlayerItem+MOAdditions.h" | |
@implementation AVPlayer (MOAdditions) | |
- (NSURL *)currentURL { | |
AVAsset *asset = self.currentItem.asset; | |
if ([asset isMemberOfClass:[AVURLAsset class]]) | |
return ((AVURLAsset *)asset).URL; |
This file contains 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 <AFNetworking.h> | |
@interface UIImageView (AFNetworkingFadeInAdditions) | |
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholderImage fadeInWithDuration:(CGFloat)duration; | |
@end |
This file contains 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 MMTableViewWithParallaxHeader : UITableView | |
@property (strong, nonatomic) NSArray *forwardTouchesOnTransparentCellToViews; | |
@end | |
@implementation MMTableViewWithParallaxHeader | |
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event { | |
if ([self pointInside:point withEvent:event]) { |
This file contains 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
# /app/controllers/comment.coffee | |
`import promisedProperty from "../utils/promised_property"` | |
CommentController = Ember.ObjectController.extend | |
needs: ["application"] | |
currentUser: Ember.computed.alias('controllers.application.currentUser') | |
isCommentController: true |
This file contains 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
static UIView *PSPDFViewWithSuffix(UIView *view, NSString *classNameSuffix) { | |
if (!view || classNameSuffix.length == 0) return nil; | |
UIView *theView = nil; | |
for (__unsafe_unretained UIView *subview in view.subviews) { | |
if ([NSStringFromClass(subview.class) hasSuffix:classNameSuffix]) { | |
return subview; | |
}else { | |
if ((theView = PSPDFViewWithSuffix(subview, classNameSuffix))) break; | |
} |
This file contains 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 MMBaseReactiveSearchTableViewModel() | |
// Most of these will actually be public/header file | |
@property (copy, nonatomic) NSArray *searchResults; | |
@property (copy, nonatomic) NSString *searchTerm; | |
@property (strong, nonatomic) NSError *error; | |
@property (assign, nonatomic) BOOL isLoading; | |
@property (strong, nonatomic) RACSubject *forceRestartServerRequestSubject; | |
@end |
This file contains 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
// Just a quick hack to achieve something like this: https://www.dropbox.com/s/6a6lsqasee0zp1q/bgview.png?dl=0 | |
@interface MMGradientBackgroundView() | |
@property (strong, nonatomic) UIImage *noiseImage; | |
@end | |
@implementation MMGradientBackgroundView | |
- (instancetype)initWithFrame:(CGRect)frame { |
This file contains 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 | |
set -x | |
cd ${0%/*}/.. | |
ARCHIVEPATH=`pwd`/archive | |
IPA_PATH=("${ARCHIVEPATH}"/*.ipa) | |
DSYM_PATH=("${ARCHIVEPATH}"/*.dSYM.zip) | |
CRASHLYTICS_API_KEY=XXXX |
OlderNewer