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
CGRect keyboardFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue]; | |
keyboardFrame = [self.view.window convertRect:keyboardFrame fromWindow:nil]; | |
keyboardFrame = [self.view convertRect:keyboardFrame fromView: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
@interface NSString (CurrencyIndicators) | |
-(NSString*)stringByAddingCurrencyIndicator:(NSString*)indicatorCode; | |
@end | |
@implementation NSString (CurrencyIndicators) | |
-(NSString*)stringByAddingCurrencyIndicator:(NSString*)indicatorCode | |
{ |
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
#pragma mark - NSFetchedResultsControllerDelegate | |
- (void)controllerWillChangeContent:(NSFetchedResultsController *)controller { | |
self.pendingObjectUpdates = [NSMutableArray array]; | |
self.pendingSectionUpdates = [NSMutableArray array]; | |
} | |
- (void)controller:(NSFetchedResultsController *)controller didChangeSection:(id <NSFetchedResultsSectionInfo>)sectionInfo | |
atIndex:(NSUInteger)sectionIndex forChangeType:(NSFetchedResultsChangeType)type { | |
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)changeArticle:(UIButton*)sender | |
{ | |
CGFloat multiplier = (sender == self.nextButton) ? 1.0 : -1.0; | |
// Render to an image and drop in the new version | |
UIGraphicsBeginImageContextWithOptions(self.articleContainer.frame.size, YES, 0); | |
CGContextRef c = UIGraphicsGetCurrentContext(); | |
[self.articleContainer.layer renderInContext:c]; | |
UIImage *articleScreenshot = UIGraphicsGetImageFromCurrentImageContext(); | |
UIGraphicsEndImageContext(); |
NewerOlder