Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.