All pastes #905907 Raw Edit

Anonymous

public text v1 · immutable
·published 2008-02-16 03:26 UTC
rendered paste body
- (void)URLResourceDidFinishLoading:(NSURL *)sender {
	CGRect thumbnailRect;
	thumbnailRect.origin.x = thumbnailRect.origin.y = 0.0f;
	thumbnailRect.size.width = 120.0f;
	thumbnailRect.size.height = 88.0f;
	UIImage *thumbnailImage = [[ UIImage alloc ] initWithData: [sender resourceDataUsingCache:YES] cache: YES];
	UIAutocorrectImageView *thumbnailView = [ [ UIAutocorrectImageView alloc ] initWithFrame: thumbnailRect image: thumbnailImage ];
	[ defaultThumbnailView removeFromSuperview ];
	[ self addSubview: thumbnailView ];
}
- (void)thumbnailWithURL:(NSString *)thumbnailURL {
	NSURL *thumbnailImageURL = [ [ NSURL alloc ] initWithString: thumbnailURL ];
	[ thumbnailImageURL loadResourceDataNotifyingClient:self usingCache:YES ];
}