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
- (void)changesSaved:(NSNotification *)notification { | |
if ([NSThread isMainThread]) { | |
[self changesSavedOnMainThread:notification]; | |
}else{ | |
@weakify(self); | |
dispatch_async(dispatch_get_main_queue(), ^{ | |
@strongify(self); | |
[self changesSavedOnMainThread:notification]; | |
}); | |
} |
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
- (CGSize)sizeForCellAtIndexPath:(NSIndexPath *)indexPath | |
{ | |
UICollectionViewCell *cell = [self configureCommentCell:self.offScreenCommentCell forItemAtIndexPath:indexPath]; | |
CGSize fittingSize = [cell.contentView systemLayoutSizeFittingSize:UILayoutFittingCompressedSize]; | |
return CGSizeMake(self.collectionView.bounds.size.width, fittingSize.height); | |
} |
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
[[[[NSBundle mainBundle] appStoreReceiptURL] lastPathComponent] isEqualToString:@"sandboxReceipt”]; |
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 <UIKit/UIKit.h> | |
IB_DESIGNABLE | |
@interface UIView (IBAddons) | |
// You could add more properties like that to have your custom properties in IB | |
@property (nonatomic, assign) IBInspectable CGFloat cornerRadius; | |
@end | |
@implementation UIView (IBAddons) | |
- (CGFloat)cornerRadius |
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
// | |
// NSObject+debugCheck.h | |
// Reverse Me | |
// | |
// Created by Derek Selander on a happy day. | |
// Copyright (c) 2013 Derek Selander. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
#include <unistd.h> |
OlderNewer