Randomly selects elements from an array, each element has a known probability of selection.
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ gem install cocoapods
To integrate WeightedRandom into your Xcode project using CocoaPods, specify it in your Podfile
:
platform :ios, '10.0'
target '<Your Target Name>' do
use_frameworks!
pod 'WeightedRandom', :git => 'https://github.com/victorhydecode/WeightedRandom.git', :tag => '1.0.0'
end
Then, run the following command:
$ pod install