• Stars
    star
    137
  • Rank 266,121 (Top 6 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created about 16 years ago
  • Updated about 16 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Varies useful libs, classes, and methods for iPhone development

MultiDownload class

To initialize and start the download:


	self.urls = [NSMutableArray arrayWithObjects:
					  @"http://maps.google.com/maps/geo?output=json&q=Lai+Chi+Kok,Hong+Kong",
					  @"http://maps.google.com/maps/geo?output=json&q=Central,Hong+Kong",
					  @"http://maps.google.com/maps/geo?output=json&q=Wan+Chai,Hong+Kong",
					  nil];

	self.downloads = [[MultipleDownload alloc] initWithUrls: urls];
	self.downloads.delegate = self;

For processing the download, use MultiDownload delegates:


 - (void) didFinishDownload:(NSNumber*)idx {
	NSLog(@"%d download: %@", [idx intValue], [downloads dataAsStringAtIndex: [idx intValue]]);
 }

 - (void) didFinishAllDownload {
	NSLog(@"Finished all download!");
	[downloads release];
 }

BlueBadge class

It uses CoreGraphic to draw a blue badge similar to the mail count in Mail.app. To initialize:


BlueBadge *blueBadge = [[BlueBadge alloc] initWithFrame: rect];
[cell addSubview:blueBadge];
[blueBadge release];

When you need to update the count:


[blueBadge drawWithCount: numOfMail];