Skip to content

Instantly share code, notes, and snippets.

View mikejahn's full-sized avatar

Mike Jahn mikejahn

View GitHub Profile
- (void)setImageWithURL:(NSURL *)url;
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholderImage;
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
// set the image of the image view asynchronously
[cell.imageView setImageWithURL: [NSURL URLWithString:@"https://url/to/image.jpg"] placeholderImage:[UIImage imageNamed:@"placeholder"]];
@mikejahn
mikejahn / test.html
Created March 6, 2014 16:55
test html
<div>test</div>
@mikejahn
mikejahn / setImageWithURL.m
Last active August 29, 2015 13:57
AFNetworking UIImageView addition method.
- (void)setImageWithURL:(NSURL *)url;
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholderImage;
@mikejahn
mikejahn / gist:9252667
Created February 27, 2014 15:47
testing console.blog
test