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)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification { | |
if(application.applicationState == UIApplicationStateActive ) { | |
DBLog(@"Received: %@", notification.alertBody); | |
// alert, because app is running in foreground | |
} | |
} |
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
UILocalNotification *notification = [[UILocalNotification alloc] init]; | |
notification.applicationIconBadgeNumber = 3; | |
// TODO schedule notification |
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
#import "ATMHud.h" | |
#import "ATMHudQueueItem.h" | |
hud = [[ATMHud alloc] initWithDelegate:self]; | |
[self.view addSubview:hud.view]; | |
ATMHudQueueItem *item = [[ATMHudQueueItem alloc] init]; | |
item.caption = @"Saving..."; | |
item.showActivity = YES; | |
[hud addQueueItem:item]; | |
[item release]; |
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
#import "ATMHud.h" | |
hud = [[ATMHud alloc] initWithDelegate:self]; | |
[self.view addSubview:hud.view]; | |
[hud setCaption:@"Successfully saved"]; | |
[hud setImage:[UIImage imageNamed:@"19-check"]]; | |
[hud show]; | |
[hud hideAfter:2.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
#import "ATMHud.h" | |
hud = [[ATMHud alloc] initWithDelegate:self]; | |
[self.view addSubview:hud.view]; | |
[hud setCaption:@"Please wait..."]; | |
[hud setActivity:YES]; | |
[hud show]; |
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
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; |
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
#import "CJSONDeserializer.h" | |
NSString *JSONString = @"[1, 2, 3]"; | |
NSData *jsonData = [JSONString dataUsingEncoding:NSUTF8StringEncoding]; | |
NSError *error = nil; | |
NSArray *array = [[CJSONDeserializer deserializer] deserializeAsArray:jsonData error:&error]; |
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
#import "JSON.h" | |
NSString *JSONString = @"[1, 2, 3]"; | |
NSArray *arrayFromString = [JSONString JSONValue]; |
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
#import "JSONKit.h" | |
NSString *JSONString = @"[1, 2, 3]"; | |
NSArray *arrayFromString = [JSONString objectFromJSONString]; |
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
#import <YAJLiOS/YAJL.h> | |
NSString *JSONString = @"[1, 2, 3]"; | |
NSArray *arrayFromString = [JSONString yajl_JSON]; |