2015-03-26 randomなint swift var items = [1,2,3] var randomIndex: Int = Int(arc4random()) % items.count items[randomIndex] みたいに使う