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 FCCDrawingView | |
- (void)setTransform:(CGAffineTransform)t | |
{ | |
[super setTransform:t]; | |
[self setNeedsDisplay]; | |
} | |
- (void)drawRect:(CGRect)rect | |
{ |
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
@interface FCCDrawingView : UIView | |
@property (nonatomic) NSUInteger index; | |
@property (nonatomic) float renderScale; | |
@property (nonatomic) FCCPageDrawingManager* pageDrawingManager; | |
@end | |
@implementation FCCDrawingView |
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)handleError:(NSError *)error | |
{ | |
[[[UIAlertView alloc] initWithTitle:@"Error" | |
message:[error localizedDescription] | |
delegate:nil | |
cancelButtonTitle:@"Close" | |
otherButtonTitles:nil] show]; | |
} |
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
int stack_machine_emulator (NSString *S) | |
{ | |
NSScanner* scanner = [NSScanner scannerWithString:S]; | |
[scanner setCharactersToBeSkipped:[NSCharacterSet characterSetWithCharactersInString:@"*+"]]; | |
NSInteger nextInt; | |
while ([scanner scanInteger:&nextInt]) | |
{ | |
NSLog(@"%d", nextInt); |
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
NSError* error; | |
NSString* path = [[NSURL URLWithString:nextofflineAdvert.url] path]; | |
if ([[NSFileManager defaultManager] fileExistsAtPath:path]) | |
{ | |
NSStringEncoding encoding; | |
NSString* html = [[NSString alloc] initWithContentsOfFile:path | |
usedEncoding:&encoding | |
error:&error]; |
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)performLogin | |
{ | |
/* Perform validation on the form input */ | |
if ([self validateLogin]) | |
{ | |
[SVProgressHUD showInView:self.view | |
status:nil | |
networkIndicator:YES | |
posY:-1 | |
maskType:SVProgressHUDMaskTypeBlack]; |
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
[Configuration configureWithOptions:@{ @"UseAPI" : @false }]; |
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
// New versus old syntax | |
NSDictionary* indexQuote = @{ @"OutCome" : outcomeStr, | |
@"Delay" : delayNum, | |
@"Date" : date, | |
@"Last" : lastNum, | |
@"Open" : openNum, | |
@"LastClose" : lastCloseNum, | |
@"High" : highNum, |
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
self.dataSource = [self.dataSource sortedArrayUsingComparator:^NSComparisonResult(id obj1, id obj2) { | |
Comment *comment1 = obj1; | |
Comment *comment2 = obj2; | |
if (comment1 == comment2) | |
{ | |
return NSOrderedSame; | |
} | |
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 <CoreData/CoreData.h> | |
/* Called Just before a merge will take place, the user info will have key kUniqueImportIdentifier with the unique import identifer */ | |
static NSString* dataWillMergeImportData = @"dataWillMergeImportData"; | |
/* Called Just after a merge completed, the user info will have key kUniqueImportIdentifier with the unique import identifer */ | |
static NSString* dataDidMergeImportData = @"dataDidMergeImportData"; | |
@interface Data : NSObject |