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
// | |
// Copyright © 2013 Yuri Kotov | |
// | |
#import <CoreLocation/CoreLocation.h> | |
typedef void(^ADVLocationHandler)(CLLocation *location, NSError *error); | |
@interface ADVLocationDetector : NSObject |
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
// | |
// Copyright © 2013 Yuri Kotov | |
// | |
#import <UIKit/UIKit.h> | |
__attribute__((always_inline)) | |
extern inline UIColor * RGB(int color); |
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
// | |
// Copyright © 2013 Yuri Kotov | |
// | |
#import <Foundation/Foundation.h> | |
@interface NSCalendar (ADVCalculations) | |
- (NSComparisonResult) compareDate:(NSDate *)date1 toDate:(NSDate *)date2 withGranularity:(NSCalendarUnit)granularity; | |
- (BOOL) isDate:(NSDate *)date1 equalToDate:(NSDate *)date2 withGranularity:(NSCalendarUnit)granularity; |
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
@protocol ADVIndexedSubscripting <NSObject> | |
- (id) objectAtIndexedSubscript:(NSUInteger)index; | |
@end | |
@protocol ADVMutableIndexedSubscripting <ADVIndexedSubscripting> | |
- (void) setObject:(id)object atIndexedSubscript:(NSUInteger)index; | |
@end | |
@protocol ADVKeyedSubscripting <NSObject> | |
- (id) objectForKeyedSubscript:(id)key; |
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
// | |
// Copyright © 2013 Yuri Kotov | |
// | |
#import <UIKit/UIKit.h> | |
@interface ADVPlaceholderViewController : UIViewController | |
@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
// | |
// Copyright © 2013 Yuri Kotov | |
// | |
@implementation UIViewController (ADVSegueDispatch) | |
#pragma clang diagnostic push | |
#pragma clang diagnostic ignored "-Wobjc-protocol-method-implementation" | |
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { | |
SEL selector = NSSelectorFromString(segue.identifier); |
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
// | |
// UIImage+H568.m | |
// | |
// Created by Angel Garcia on 9/28/12. | |
// Copyright (c) 2012 angelolloqui.com. All rights reserved. | |
// | |
#import <objc/runtime.h> | |
@implementation UIImage (H568) |
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
// | |
// Copyright © 2013 Yuri Kotov | |
// | |
#import <Foundation/Foundation.h> | |
typedef void(^ADVCellConfigurationBlock)(id cell, id object); | |
@interface ADVDataSource : NSObject <UITableViewDataSource, UICollectionViewDataSource> |
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
// | |
// Copyright © 2013 Yuri Kotov | |
// | |
#import <Foundation/Foundation.h> | |
#import "ADVIndexedSubscripting.h" | |
typedef void(^ADVCellConfigurationBlock)(id cell, id object); | |
@interface ADVArrayDataSource : NSObject <ADVIndexedSubscripting, UITableViewDataSource, UICollectionViewDataSource> |
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
// | |
// Copyright © 2013 Yuri Kotov | |
// | |
#import <Foundation/Foundation.h> | |
typedef void(^ADVManagedObjectHandler)(id object); | |
@interface ADVManagedObjectController : NSObject |