diff --git a/README.markdown b/README.markdown index e914b01b4..399d19dee 100644 --- a/README.markdown +++ b/README.markdown @@ -2,7 +2,7 @@ Modern development is highly asynchronous; isn’t it about time iOS developers PromiseKit is not just a Promises implementation, it is also a collection of helper functions that make the typical asynchronous patterns we use in iOS development delightful *too*. -PromiseKit is also designed to be integrated into other CocoaPods. If your library has asyncronous operations and you like PromiseKit, then add an opt-in subspec that provides Promises for your users. HOWTO provided later in this README. +PromiseKit is also designed to be integrated into other CocoaPods. If your library has asynchronous operations and you like PromiseKit, then add an opt-in subspec that provides Promises for your users. Documentation to help you integrate PromiseKit into your own pods is provided later in this README. #Using PromiseKit @@ -34,7 +34,7 @@ Synchronous code is clean code. For example, showing a gravatar image: ```objc NSString *md5 = md5(email); -NSString *url = [@"http://gravatar.com/avatar/%@" stringByAppendingString:md5]; +NSString *url = [@"http://gravatar.com/avatar/" stringByAppendingString:md5]; NSData *data = [NSData dataWithContentsOfURL:[NSURL URLWithString:url]]; self.imageView.image = [UIImage imageWithData:data]; ``` @@ -47,7 +47,7 @@ The asynchronous analog suffers from *rightward-drift*: ```objc dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ NSString *md5 = md5(email); - NSString *url = [@"http://gravatar.com/avatar/%@" stringByAppendingString:md5]; + NSString *url = [@"http://gravatar.com/avatar/" stringByAppendingString:md5]; NSURLRequest *rq = [NSURLRequest requestWithURL:[NSURL URLWithString:url]]; [NSURLConnection sendAsynchronousRequest:rq queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse *response, NSData *data, NSError *connectionError) { UIImage *gravatarImage = [UIImage imageWithData:data]; @@ -84,7 +84,7 @@ Synchronous code has simple, clean error handling: ```objc @try { NSString *md5 = md5(email); - NSString *url = [@"http://gravatar.com/avatar/%@" stringByAppendingString:md5]; + NSString *url = [@"http://gravatar.com/avatar/" stringByAppendingString:md5]; NSData *data = [NSData dataWithContentsOfURL:[NSURL URLWithString:url]]; self.imageView.image = [UIImage imageWithData:data]; } @catch (NSError *error) { @@ -102,7 +102,7 @@ void (^errorHandler)(NSError *) = ^(NSError *error){ dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ @try { NSString *md5 = md5(email); - NSString *url = [@"http://gravatar.com/avatar/%@" stringByAppendingString:md5]; + NSString *url = [@"http://gravatar.com/avatar/" stringByAppendingString:md5]; NSURLRequest *rq = [NSURLRequest requestWithURL:[NSURL URLWithString:url]]; [NSURLConnection sendAsynchronousRequest:rq queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse *response, NSData *data, NSError *connectionError) {