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
| // Flowchat | |
| WatchListServiceRequest *addReq = [[WatchListServiceRequest alloc] initWithRequestType:WatchListServiceRequestAddToList appIdentifier:@"317685067" watchPrice:[NSNumber numberWithFloat:2.99]]; | |
| [[WatchListServiceConnection sharedConnection] performServiceRequest:addReq delegate:nil]; | |
| [addReq release]; | |
| // Rolando 2 | |
| addReq = [[WatchListServiceRequest alloc] initWithRequestType:WatchListServiceRequestAddToList appIdentifier:@"321084051" watchPrice:[NSNumber numberWithFloat:0.00]]; | |
| [[WatchListServiceConnection sharedConnection] performServiceRequest:addReq delegate:nil]; | |
| [addReq release]; |
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
| (gdb) po [priceArray objectAtIndex:3] | |
| 2.99 | |
| (gdb) po [appData watchPrice] | |
| 2.99 | |
| (gdb) print (float) [[priceArray objectAtIndex:3] floatValue] | |
| $25 = 2.99000001 | |
| (gdb) print (float) [[appData watchPrice] floatValue] | |
| $26 = 2.99000001 | |
| (gdb) print (BOOL) [(NSNumber*)[priceArray objectAtIndex:3] isEqual:(NSNumber*)[appData watchPrice]] | |
| $28 = 0 '\000' |
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
| static WatchListServiceConnection *WLSCSharedInstance; | |
| + (WatchListServiceConnection*)sharedConnection { | |
| @synchronized(self) { | |
| if (WLSCSharedInstance == nil) { | |
| // Even though assignment is already done in allocWithZone: (as it | |
| // should be), assignment is done again here to make Clang SA happy | |
| WLSCSharedInstance = [[WatchListServiceConnection 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
| #ifdef DEBUG | |
| #define debugLog(fmt, ...) NSLog(@"%s (%@:%d) %@", \ | |
| __PRETTY_FUNCTION__, \ | |
| [[NSString stringWithUTF8String:__FILE__] lastPathComponent], \ | |
| __LINE__, \ | |
| [NSString stringWithFormat:(s), ##__VA_ARGS__]) | |
| #else | |
| #define debugLog(fmt, ...) | |
| #endif |
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
| - (id)initWithFrame:(CGRect)frame reuseIdentifier:(NSString *)reuseIdentifier { | |
| if ((self = [super initWithFrame:frame reuseIdentifier:reuseIdentifier])) { | |
| backgroundImageView = [[UIImageView alloc] initWithImage:nil]; | |
| backgroundImageView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; | |
| self.backgroundView = backgroundImageView; | |
| [backgroundImageView release]; | |
| textLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 200, 20)]; | |
| textLabel.center = CGPointMake(160, self.contentView.center.y); | |
| textLabel.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin; |
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
| NSString *htmlBody = @"you probably want something HTML-y here"; | |
| NSString *escapedBody = [(NSString*)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)htmlBody, NULL, CFSTR("?=&+"), kCFStringEncodingUTF8) autorelease]; | |
| NSString *mailtoPrefix = [@"mailto:?subject=Some Subject&body=" stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; | |
| NSString *mailtoStr = [mailtoPrefix stringByAppendingString:escapedBody]; | |
| [[UIApplication sharedApplication] openURL:[NSURL URLWithString:mailtoStr]]; |
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)drawRect:(CGRect)rect { | |
| CGContextRef context = UIGraphicsGetCurrentContext(); | |
| CGContextSaveGState(context); | |
| CGContextTranslateCTM(context, 0, rect.size.height); | |
| CGContextScaleCTM(context, 1, -1); | |
| // Do some drawing with CGContextDrawImage() | |
| CGContextRestoreGState(context); | |
| // Do some drawing with -[NSString(UIDrawing) drawInRect:] |
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
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>page-type</key> | |
| <dict> | |
| <key>template-name</key><string>software</string> | |
| <key>template-parameters</key> | |
| <dict> | |
| </dict> |
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
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>page-type</key> | |
| <dict> | |
| <key>template-name</key><string>software</string> | |
| <key>template-parameters</key> | |
| <dict> | |
| </dict> |
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
| 21:58:24.271922 IP 192.168.1.75.52705 > 209.8.115.150.http: P 1:712(711) ack 1 win 32942 <nop,nop,timestamp 443235121 952676702> | |
| E.....@[email protected][email protected]..... | |
| .k;18..^GET /WebObjects/MZStore.woa/wa/viewSoftware?id=292421271&mt=8 HTTP/1.1 | |
| Cookie: X-Dsid=16172939; a=AAAAAgAAAB4AInBQdkJsc2dpVVdjLUZCYkhkdHpodDBHUndlZjZBS0J2cUEAH/hzAAABHmE05oE=; s_vi=[CS]v1|48EB9D1700006FCC-A2C0C16000004AE[CE]; asbid=sA99YK9DKDXJPJ2AJ; dssid=63087516-8795-4962-954c-2e625a2db375; Pod=9 | |
| X-Apple-Connection-Type: WiFi | |
| User-Agent: iTunes-iPhone/2.2 (2) | |
| Accept-Language: en;q=1.0,fr;q=0.9,de;q=0.9,ja;q=0.8,nl;q=0.8,it;q=0.7,es;q=0.7,pt;q=0.6,pt-PT;q=0.6,da;q=0.5,fi;q=0.5,nb;q=0.4,sv;q=0.4,ko;q=0.3,zh-Hans;q=0.3,zh-Hant;q=0.2,ru;q=0.2,pl;q=0.1 | |
| X-Apple-Store-Front: 143441-1,2 | |
| X-Dsid: 16172939 | |
| Accept: */* |