This is some simple body text that I am writing. why not click here
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
nav#socialicons img { margin-right: 16px; opacity: 0.35; -webkit-transition-duration: 0.5s;} | |
nav#socialicons span { display: block; padding: 0px 10px; position: absolute; top: -28px; opacity: 0; border-radius: 50px; background: #222; -webkit-transition-duration: 0.5s;} | |
nav#socialicons a:hover img { opacity: 1; -webkit-transform: rotateY(360deg); -webkit-transition-timing-function: ease-out; } | |
nav#socialicons a:hover img + span { opacity: 1;} |
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
typedef enum { | |
SyncManagerStatusOK, | |
SyncManagerStatusFailed, | |
SyncManagerStatusPending, | |
SyncManagerStatusDownloading, | |
SyncManagerStatusWriting, | |
SyncManagerStatusDownloadingTemplates, | |
SyncManagerStatusWritingTemplates, | |
SyncManagerStatusDownloadingDocuments, | |
SyncManagerStatusWritingDocuments, |
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
typedef enum { | |
SyncManagerStatusOK, | |
SyncManagerStatusFailed, | |
SyncManagerStatusPending, | |
SyncManagerStatusDownloading, | |
SyncManagerStatusWriting, | |
SyncManagerStatusDownloadingTemplates, | |
SyncManagerStatusWritingTemplates, | |
SyncManagerStatusDownloadingDocuments, | |
SyncManagerStatusWritingDocuments, |
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 *myMainThreadShit = nil; | |
dispatch_async( dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_DEFAULT, 0 ), ^{ | |
// do massive intensive shit | |
NSArray *myShit = [MyModel getMyShit]; | |
dispatch_async( dispatch_get_main_queue(), ^{ | |
// this is on main thread | |
myMainThreadShit = [myShit copy]; |
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
#pragma mark - | |
#pragma mark Core Data stack | |
/** | |
Returns the managed object context for the application. | |
If the context doesn't already exist, it is created and bound to the persistent store coordinator for the application. | |
*/ | |
- (NSManagedObjectContext *) managedObjectContext { | |
if (managedObjectContext != nil) { |
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
#import "NSDataAdditions.h" | |
static char encodingTable[64] = { | |
'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P', | |
'Q','R','S','T','U','V','W','X','Y','Z','a','b','c','d','e','f', | |
'g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v', | |
'w','x','y','z','0','1','2','3','4','5','6','7','8','9','+','/' }; | |
@implementation NSData (NSDataAdditions) | |
+ (NSData *) dataWithBase64EncodedString:(NSString *) string { |
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
@implementation StubbyNavigationController | |
- (UINavigationBar *)navigationBar | |
{ | |
[super.navigationBar setFrame:CGRectMake(0, 20, 300, 44)]; | |
return super.navigationBar; | |
} | |
@end |
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
What Apple gives you and will cause a crash as dequeueReusableCellWithIdentifier: can't return a cell as none have ever been initialised. | |
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath | |
{ | |
static NSString *CellIdentifier = @"Cell"; | |
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; | |
return cell; | |
} |
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
// Get the data into a bitmap. | |
[self lockFocus]; | |
rep = [[NSBitmapImageRep alloc] initWithFocusedViewRect:[self bounds]]; | |
[self unlockFocus]; | |
// Make an NSImage from our bitmap. | |
image = [[[NSImage alloc] initWithSize:[rep size]] autorelease]; | |
[image addRepresentation:rep]; | |
NSData * tiffData = [image TIFFRepresentationUsingCompression: NSTIFFCompressionNone factor: 0.0f]; |