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
NSArray * playerIdentifiers = [matches SH_reduceValue:@[] withBlock:^id(NSArray *memo, GKTurnBasedMatch *obj) { | |
return [memo arrayByAddingObjectsFromArray:[obj SH_playerIdentifier]]; | |
}]; | |
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
// 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 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 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 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 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 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 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
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath | |
{ | |
NSLog(@"Adding Cell"); | |
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"tokenSuggestCell"]; | |
if (!cell) { | |
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"MyTokenFieldCell" owner:self options:nil]; | |
cell = (UITableViewCell *)[nib objectAtIndex:0]; |
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 RootViewController : UITableViewController | |
@property (nonatomic, copy) NSArray *region; | |
@end |
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)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
[self setTableView:[[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped]]; | |
[self setRegions:@[@[@"Bologna", @"Florence", @"Milan"]], @[@"Naples", @"Rome", @"Turin"]]]; | |
[self setTitle:@"Region"]; | |
} |