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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>History API</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script> | |
<script src="https://cdn.paddle.com/paddle/paddle.js"></script> | |
<script type="text/javascript"> | |
Paddle.Setup({ |
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
- (NSArray*) moveManagedObjects:(NSArray*)managedObjects toContext:(NSManagedObjectContext*)newContext | |
{ | |
NSMutableArray* movedManagedObjects = [NSMutableArray array]; | |
for (NSManagedObject* managedObject in managedObjects) { | |
NSManagedObject* newManagedObject = [newContext objectWithID:managedObject.objectID]; | |
[movedManagedObjects addObject:newManagedObject]; | |
} | |
return movedManagedObjects; | |
} |
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
- (void) setHighlighted:(BOOL)highlighted | |
{ | |
if (highlighted) { | |
[self setBackgroundColor:kCellSelectionColour]; | |
[self.subviews enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { | |
[obj setAlpha:0.5]; | |
}]; | |
} else { | |
[self setBackgroundColor:[UIColor whiteColor]]; | |
[self.subviews enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { |
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
- (void) touchesBegan:(NSSet *)touches | |
withEvent:(UIEvent *)event | |
{ | |
[super touchesBegan:touches withEvent:event]; | |
UITouch* touch = touches.allObjects.firstObject; | |
if ([touch.view isKindOfClass:[SupplementaryViewClass class]]) { | |
SupplementaryViewClass *sectionHeader = (SupplementaryViewClass*)touch.view; | |
[sectionHeader setHighlighted:YES]; | |
} | |
} |