Show what image I am on in a UIScrollview swift
<p>Say I have 4 images that i download
I want to reverse the number of the image that I am on. Right now the image starts at 4/4 but I want it to read 1/4. So basically I am tying to reverse the numbers. This function is finding which number of the image that I am on. So the closer it get to the last image it turns the number to 1. I want the opposite effect. I want the number of the last image to turn to 4. So if i swipe right the number goes down from 4/4 to 3/4 to 2/4 to 1/4. But I want the first image to be 1 not 4 so it goes 1/4 to 2/4 to 3/4 to 4/4.</p>

<p>Here is how I am doing it:</p>

<pre><code>//MARK: Set up and download Promotions
var numberPromotions = 0;
var imageSize = 0;
private var promos = Array&lt;(picture: String, path: String)&gt;()

func scrollViewDidEndDecelerating(scrollView: UIScrollView) {
    print("Scroll finished")
    print("My promot gus" , self.numberPromotions)
    print("Scroll number", scrollView.contentOffset.x)
    print("IMAGE size " , self.imageSize)

    var myPlace : Double = 0
    var totalSize : Double = 0

    let scrollviewOffset = Double(scrollView.contentOffset.x)
    print("int Scroview " , scrollviewOffset)



    totalSize = Double(self.imageSize * (numberPromotions - 1))
    print("To;tal size" , totalSize)
    if scrollviewOffset == 0 {
        myPlace = Double(numberPromotions)
    }else
    {
         myPlace = Double(totalSize / scrollviewOffset)
        print("Gus Place" , myPlace)
    }

    print(myPlace % 1 == 0.5)
    if myPlace % 1 == 0.5
    {
        print("Not a whole number Adding 0.5")
        myPlace = myPlace + 0.5
    }
    print("My place", myPlace)

    var myString : String
    let myPlaceString = String(Int(myPlace))

    myString = myPlaceString + "/" + String(numberPromotions)
    numOfPromoLabel.text = myString

}
</code></pre>