Skip to content

Instantly share code, notes, and snippets.

@000Dmyers000
000Dmyers000 / SwiftBackNext
Created July 27, 2016 14:52
I would like to control an array in sequence for back and next buttons, right now it selects the items randomly "Int(arc4random_uniform)" how can I change this? (I have not added the else/if functions yet)
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var slide: UIImageView!
@IBOutlet weak var playNextButton: UIButton!
var slideArray:[String] = ["slide1", "slide2", "slide3", "slide4"]