Resolve a problem that random index is not a real random value. Use arc4random() instead of rand();
Make jpg files can be listed, and put scaled png files into xcassets.