Finally i came up with solution
Just put your five view in a mutable array, and initialize your x offset to 0. Then get a random number and grab the view in the array (random modulo array count, to stay inside the array). Add this view to your scrollview and increase your x offset by the width of the choosed view. Stop when array count is zero for example. Then your x tells you the width of your scrollview, simply set its contentSize :
theScrollView.contentSize = CGSizeMake( x, theScrollView.frame.size.height);