Skip to content

Instantly share code, notes, and snippets.

@bartleby
Created January 31, 2015 11:15
Show Gist options
  • Save bartleby/20a0f496add4064b7ced to your computer and use it in GitHub Desktop.
Save bartleby/20a0f496add4064b7ced to your computer and use it in GitHub Desktop.
Random Image Generator
- (NSArray *)imageURLs
{
if (!_imageURLs)
{
NSMutableArray *imageURLs = [NSMutableArray array];
for (NSInteger index = 0; index < 100; ++index)
{
[imageURLs addObject:[NSString stringWithFormat:
@"http://dummyimage.com/200/%06X/%06X&text=%ld",
arc4random() % 0xFFFFFF,
arc4random() % 0xFFFFFF,
index + 1]];
}
_imageURLs = imageURLs;
}
return _imageURLs;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment