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
| @property (copy) NSArray regions; | |
| - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section | |
| { | |
| return (if tableView == self.searchDisplayController.searchResultsTableView | |
| then [filteredResult count] | |
| else [regions[section] count]); | |
| } |
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
| Doom:~ tatd2$ clang -framework Foundation -fobjc-arc Foo.m | |
| Doom:~ tatd2$ gdb ./a.out | |
| GNU gdb 6.3.50-20050815 (Apple version gdb-1820) (Sat Jun 16 02:40:11 UTC 2012) | |
| Copyright 2004 Free Software Foundation, Inc. | |
| GDB is free software, covered by the GNU General Public License, and you are | |
| welcome to change it and/or distribute copies of it under certain conditions. | |
| Type "show copying" to see the conditions. | |
| There is absolutely no warranty for GDB. Type "show warranty" for details. | |
| This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries ..... done |
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
| +(PHColorSchemeManager*) sharedInstance | |
| { | |
| static PHColorSchemeManager* theInstance = nil; | |
| static dispatch_once_t onceToken; | |
| dispatch_once(&onceToken, ^() | |
| { | |
| theInstance = [[[self class] alloc] init]; | |
| }); | |
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
| // HomeTableViewController | |
| - (IBAction)btnLogout:(id)sender { | |
| self.animateBOOL = YES; | |
| [Lockbox setString:@"FALSE" forKey:kLoggedinStatusKeyString]; | |
| [(TabBarViewController *)[self tabBarController] loginCheck:animateBOOL]; | |
| } | |
| // TabBarViewController |
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 JAHFirstViewController : UIViewController // Note, JAH class prefix, you should prefix all of your classes | |
| @property (nonatomic, strong) NSMutableArray *json; /* this property is named poorly – it's not json, it's an array */ | |
| @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
| // header | |
| #import <CoreGraphics/CoreGraphics.h> | |
| CG_INLINE CGRect CGRectMakeWithSize(CGSize size); | |
| CG_INLINE CGRect CGRectMakeWithPointAndSize(CGPoint point, CGSize size); | |
| CG_INLINE void CGRectMoveToY(CGRect rect, CGFloat y); |
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 * playerIdentifiers = [matches SH_reduceValue:@[] withBlock:^id(NSArray *memo, GKTurnBasedMatch *obj) { | |
| return [memo arrayByAddingObjectsFromArray:[obj SH_playerIdentifier]]; | |
| }]; | |
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
| NSMutableArray *playerIds = [[NSMutableArray alloc] init]; | |
| for (GKTurnBasedMatch *match in theMatches) | |
| { | |
| [playerIds addObjectsFromArray:[match playerIdentifiers]]; | |
| } | |
| [playerIds addObjectsFromArray:friends]; |
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
| /* | |
| Example.m | |
| Created by Remy "Psy" Demarest on 21/04/2012. | |
| Copyright (c) 2012. Remy "Psy" Demarest | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
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
| ... All of foundation's headers ... | |
| @interface MyQuiz : NSObject | |
| @property (nonatomic, strong) NSMutableArray *quoteArray; | |
| -(id) initWithTheQuiz : (NSString *) plistName; | |
| @end | |
| @implementation MyQuiz | |
| -(id) initWithTheQuiz:(NSString *)plistName { | |
| self = [super init]; | |
| if(self) { |